How to use the unittest2.expectedFailure function in unittest2

To help you get started, we’ve selected a few unittest2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lanl / scout / test / functionalities / thread / state / TestThreadStates.py View on Github external
    @dwarf_test
    @unittest2.expectedFailure("llvm.org/pr15824") # thread states not properly maintained
    @expectedFailureWindows("llvm.org/pr24668") # Breakpoints not resolved correctly
    def test_process_state_with_dwarf(self):
        """Test thread states (comprehensive)."""
        self.buildDwarf(dictionary=self.getBuildFlags(use_cpp11=False))
        self.thread_states_test()
github apple / swift-lldb / test / lang / cpp / rdar12991846 / TestRdar12991846.py View on Github external
    @unittest2.expectedFailure("rdar://18684408")
    @expectedFailureWindows("llvm.org/pr24489: Name lookup not working correctly on Windows")
    def test_expr3(self):
        """Test that the expression parser returns proper Unicode strings."""
        self.build()
        self.rdar12991846(expr=3)
github apple / swift-lldb / test / functionalities / breakpoint / consecutive_breakpoins / TestConsecutiveBreakpoints.py View on Github external
    @unittest2.expectedFailure("llvm.org/pr23478")
    def test (self):
        self.build ()
        self.consecutive_breakpoints_tests()
github apple / swift-lldb / test / lang / objc / modules-incomplete / TestIncompleteModules.py View on Github external
    @unittest2.expectedFailure("rdar://20416388")
    @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
    def test_expr(self):
        self.build()
        exe = os.path.join(os.getcwd(), "a.out")
        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)

        # Break inside the foo function which takes a bar_ptr argument.
        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)

        self.runCmd("run", RUN_SUCCEEDED)

        # The stop reason of the thread should be breakpoint.
        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
            substrs = ['stopped',
                       'stop reason = breakpoint'])
github apple / swift-lldb / test / tools / lldb-mi / breakpoint / TestMiBreak.py View on Github external
    @unittest2.expectedFailure("-break-insert doesn't work for absolute path")
    def test_lldbmi_break_insert_file_line_absolute_path(self):
        """Test that 'lldb-mi --interpreter' works for file:line breakpoints."""

        self.spawnLldbMi(args = None)

        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
        self.expect("\^done")

        self.runCmd("-break-insert -f main")
        self.expect("\^done,bkpt={number=\"1\"")

        self.runCmd("-exec-run")
        self.expect("\^running")
        self.expect("\*stopped,reason=\"breakpoint-hit\"")

        import os
github testing-cabal / mock / tests / testpatch.py View on Github external
    @unittest.expectedFailure
    def test_patch_descriptor(self):
        # would be some effort to fix this - we could special case the
        # builtin descriptors: classmethod, property, staticmethod
        class Nothing(object):
            foo = None

        class Something(object):
            foo = {}

            @patch.object(Nothing, 'foo', 2)
            @classmethod
            def klass(cls):
                self.assertIs(cls, Something)

            @patch.object(Nothing, 'foo', 2)
            @staticmethod
github mdshw5 / pyfaidx / tests / test_Fasta_bgzip.py View on Github external
    @expectedFailure
    def test_build_issue_126(self):
        """ Samtools BGZF index should be identical to pyfaidx BGZF index """
        expect_index = ("gi|563317589|dbj|AB821309.1|	3510	114	70	71\n"
                        "gi|557361099|gb|KF435150.1|	481	3789	70	71\n"
                        "gi|557361097|gb|KF435149.1|	642	4368	70	71\n"
                        "gi|543583796|ref|NR_104216.1|	4573	5141	70	71\n"
                        "gi|543583795|ref|NR_104215.1|	5317	9901	70	71\n"
                        "gi|543583794|ref|NR_104212.1|	5374	15415	70	71\n"
                        "gi|543583788|ref|NM_001282545.1|	4170	20980	70	71\n"
                        "gi|543583786|ref|NM_001282543.1|	5466	25324	70	71\n"
                        "gi|543583785|ref|NM_000465.3|	5523	30980	70	71\n"
                        "gi|543583740|ref|NM_001282549.1|	3984	36696	70	71\n"
                        "gi|543583738|ref|NM_001282548.1|	4113	40851	70	71\n"
                        "gi|530384540|ref|XM_005249645.1|	2752	45151	70	71\n"
                        "gi|530384538|ref|XM_005249644.1|	3004	48071	70	71\n"
                        "gi|530384536|ref|XM_005249643.1|	3109	51246	70	71\n"
github apple / swift-lldb / test / lang / c / shared_lib / TestSharedLib.py View on Github external
    @unittest2.expectedFailure("rdar://problem/10704639")
    def test_frame_variable(self):
        """Test that types work when defined in a shared library and forward-declared in the main executable"""
        self.build()
        self.common_setup()

        # This should display correctly.
        self.expect("frame variable --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
            substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
github parallel-p / thehat / tests / pregame_handlers_tests.py View on Github external
    @unittest2.expectedFailure
    def test_connect_to_game_broken_pin(self):
        post_request = PregameHandlersTest.make_game(CREATE_GAME_JSON)
        post_request.get_response(main.app)
        body = 'json={0}'.format(json.dumps({"pong": "123"}))
        post_request = PregameHandlersTest.make_request('/new_device_id/pregame/join', 'POST', body)
        response = post_request.get_response(main.app)
        self.assertEqual(response.status_int, 400)
github parallel-p / thehat / tests / pregame_handlers_tests.py View on Github external
    @unittest2.expectedFailure
    def test_connect_to_game_wrong_pin(self):
        body = 'json={0}'.format(json.dumps({"pin": "123"}))
        post_request = PregameHandlersTest.make_request('/device_id/pregame/join', 'POST', body)
        response = post_request.get_response(main.app)
        self.assertEqual(response.status_int, 403)