diff options
author | Anthony Shaw <anthonyshaw@apache.org> | 2018-03-23 15:39:34 +1100 |
---|---|---|
committer | Anthony Shaw <anthonyshaw@apache.org> | 2018-03-23 15:39:34 +1100 |
commit | 242fb7852b66e2dc419e8a1d8b0150876ae38eac (patch) | |
tree | b1a03cfe42b1b519c9a0db0b24514967ff5588a1 /testing | |
parent | 1ec99132e69a9fa2d103471fc6145b375d1e5fe1 (diff) | |
download | pytest-242fb7852b66e2dc419e8a1d8b0150876ae38eac.tar.gz |
linting and removed double test
Diffstat (limited to 'testing')
-rw-r--r-- | testing/test_pdb.py | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/testing/test_pdb.py b/testing/test_pdb.py index 8051d04c3..fe54321ca 100644 --- a/testing/test_pdb.py +++ b/testing/test_pdb.py @@ -469,7 +469,7 @@ class TestDebuggingBreakpoints(object): def test_supports_breakpoint_module_global(self): """ - Test that supports breakpoint global marks on Python 3.7+ and not on + Test that supports breakpoint global marks on Python 3.7+ and not on CPython 3.5, 2.7 """ if sys.version_info.major == 3 and sys.version_info.minor >= 7: @@ -486,15 +486,6 @@ class TestDebuggingBreakpoints(object): """ assert sys.breakpointhook != pytestPDB.set_trace - - @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin") - def test_sys_breakpointhook_not_custom_pdb(self): - """ - Test that sys.breakpointhook is not set to the custom Pdb class without configuration - """ - assert sys.breakpointhook != pytestPDB.set_trace - - @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin") def test_sys_breakpointhook_configure_and_unconfigure(self, testdir): """ @@ -512,9 +503,11 @@ class TestDebuggingBreakpoints(object): assert a == 0 """) result = testdir.runpytest_inprocess("", p1) + result.stdout.fnmatch_lines([ + "*1 passed*", + ]) assert sys.breakpointhook != pytestPDB.set_trace - @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin") def test_sys_breakpointhook_configure_and_unconfigure_with_pdb_flag(self, testdir): config = testdir.parseconfig() @@ -528,6 +521,9 @@ class TestDebuggingBreakpoints(object): assert a == 0 """) result = testdir.runpytest_inprocess("--pdb", p1) + result.stdout.fnmatch_lines([ + "*1 passed*", + ]) assert sys.breakpointhook != pytestPDB.set_trace @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin") @@ -544,9 +540,8 @@ class TestDebuggingBreakpoints(object): ]) assert custom_debugger_hook == ["init", "set_trace"] - @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin") - @pytest.mark.skipif(not _ENVIRON_PYTHONBREAKPOINT=='', reason="Requires breakpoint() default value") + @pytest.mark.skipif(not _ENVIRON_PYTHONBREAKPOINT == '', reason="Requires breakpoint() default value") def test_sys_breakpoint_interception(self, testdir): p1 = testdir.makepyfile(""" def test_1(): @@ -561,7 +556,6 @@ class TestDebuggingBreakpoints(object): assert "reading from stdin while output" not in rest TestPDB.flush(child) - @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin") def test_pdb_not_altered(self, testdir): """ |