Merge pull request #5992 from blueyed/tests-PDBPP_HIJACK_PDB
tests: debugging: disable pdb++ within inner tests
This commit is contained in:
		
						commit
						0783030357
					
				| 
						 | 
					@ -17,6 +17,14 @@ else:
 | 
				
			||||||
_ENVIRON_PYTHONBREAKPOINT = os.environ.get("PYTHONBREAKPOINT", "")
 | 
					_ENVIRON_PYTHONBREAKPOINT = os.environ.get("PYTHONBREAKPOINT", "")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@pytest.fixture(autouse=True)
 | 
				
			||||||
 | 
					def pdb_env(request):
 | 
				
			||||||
 | 
					    if "testdir" in request.fixturenames:
 | 
				
			||||||
 | 
					        # Disable pdb++ with inner tests.
 | 
				
			||||||
 | 
					        testdir = request.getfixturevalue("testdir")
 | 
				
			||||||
 | 
					        testdir._env_run_update["PDBPP_HIJACK_PDB"] = "0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def runpdb_and_get_report(testdir, source):
 | 
					def runpdb_and_get_report(testdir, source):
 | 
				
			||||||
    p = testdir.makepyfile(source)
 | 
					    p = testdir.makepyfile(source)
 | 
				
			||||||
    result = testdir.runpytest_inprocess("--pdb", p)
 | 
					    result = testdir.runpytest_inprocess("--pdb", p)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue