We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 860bc50 + 9e522c9 commit 8facf1dCopy full SHA for 8facf1d
testing/python/fixture.py
@@ -526,23 +526,16 @@ def something(request):
526
527
try:
528
gc.collect()
529
- leaked_types = sum(1 for _ in gc.garbage
530
- if isinstance(_, PseudoFixtureDef))
531
-
532
- # debug leaked types if the test fails
533
- print(leaked_types)
534
535
- gc.garbage[:] = []
536
537
- assert leaked_types == 0
+ leaked = [x for _ in gc.garbage if isinstance(_, PseudoFixtureDef)]
+ assert leaked == []
538
finally:
539
gc.set_debug(original)
540
541
def test_func():
542
pass
543
"""
544
)
545
- result = testdir.runpytest()
+ result = testdir.runpytest_subprocess()
546
result.stdout.fnmatch_lines("* 1 passed in *")
547
548
def test_getfixturevalue_recursive(self, testdir):
0 commit comments