linting and removed double test
This commit is contained in:
		
							parent
							
								
									1ec99132e6
								
							
						
					
					
						commit
						242fb7852b
					
				| 
						 | 
					@ -469,7 +469,7 @@ class TestDebuggingBreakpoints(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_supports_breakpoint_module_global(self):
 | 
					    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
 | 
					        CPython 3.5, 2.7
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        if sys.version_info.major == 3 and sys.version_info.minor >= 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
 | 
					        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")
 | 
					    @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin")
 | 
				
			||||||
    def test_sys_breakpointhook_configure_and_unconfigure(self, testdir):
 | 
					    def test_sys_breakpointhook_configure_and_unconfigure(self, testdir):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
| 
						 | 
					@ -512,9 +503,11 @@ class TestDebuggingBreakpoints(object):
 | 
				
			||||||
            assert a == 0
 | 
					            assert a == 0
 | 
				
			||||||
        """)
 | 
					        """)
 | 
				
			||||||
        result = testdir.runpytest_inprocess("", p1)
 | 
					        result = testdir.runpytest_inprocess("", p1)
 | 
				
			||||||
 | 
					        result.stdout.fnmatch_lines([
 | 
				
			||||||
 | 
					            "*1 passed*",
 | 
				
			||||||
 | 
					        ])
 | 
				
			||||||
        assert sys.breakpointhook != pytestPDB.set_trace
 | 
					        assert sys.breakpointhook != pytestPDB.set_trace
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin")
 | 
					    @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin")
 | 
				
			||||||
    def test_sys_breakpointhook_configure_and_unconfigure_with_pdb_flag(self, testdir):
 | 
					    def test_sys_breakpointhook_configure_and_unconfigure_with_pdb_flag(self, testdir):
 | 
				
			||||||
        config = testdir.parseconfig()
 | 
					        config = testdir.parseconfig()
 | 
				
			||||||
| 
						 | 
					@ -528,6 +521,9 @@ class TestDebuggingBreakpoints(object):
 | 
				
			||||||
            assert a == 0
 | 
					            assert a == 0
 | 
				
			||||||
        """)
 | 
					        """)
 | 
				
			||||||
        result = testdir.runpytest_inprocess("--pdb", p1)
 | 
					        result = testdir.runpytest_inprocess("--pdb", p1)
 | 
				
			||||||
 | 
					        result.stdout.fnmatch_lines([
 | 
				
			||||||
 | 
					            "*1 passed*",
 | 
				
			||||||
 | 
					        ])
 | 
				
			||||||
        assert sys.breakpointhook != pytestPDB.set_trace
 | 
					        assert sys.breakpointhook != pytestPDB.set_trace
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin")
 | 
					    @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"]
 | 
					        assert custom_debugger_hook == ["init", "set_trace"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin")
 | 
					    @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):
 | 
					    def test_sys_breakpoint_interception(self, testdir):
 | 
				
			||||||
        p1 = testdir.makepyfile("""
 | 
					        p1 = testdir.makepyfile("""
 | 
				
			||||||
            def test_1():
 | 
					            def test_1():
 | 
				
			||||||
| 
						 | 
					@ -561,7 +556,6 @@ class TestDebuggingBreakpoints(object):
 | 
				
			||||||
        assert "reading from stdin while output" not in rest
 | 
					        assert "reading from stdin while output" not in rest
 | 
				
			||||||
        TestPDB.flush(child)
 | 
					        TestPDB.flush(child)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin")
 | 
					    @pytest.mark.skipif(not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin")
 | 
				
			||||||
    def test_pdb_not_altered(self, testdir):
 | 
					    def test_pdb_not_altered(self, testdir):
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue