From 242fb7852b66e2dc419e8a1d8b0150876ae38eac Mon Sep 17 00:00:00 2001 From: Anthony Shaw Date: Fri, 23 Mar 2018 15:39:34 +1100 Subject: linting and removed double test --- testing/test_pdb.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'testing') 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): """ -- cgit v1.2.3