We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 61471df + 5ea647a commit 04b65cfCopy full SHA for 04b65cf
testing/python/fixture.py
@@ -630,7 +630,7 @@ def test_request_garbage(self, testdir):
630
"""
631
import sys
632
import pytest
633
- from _pytest.compat import safe_str
+ from _pytest.fixtures import PseudoFixtureDef
634
import gc
635
636
@pytest.fixture(autouse=True)
@@ -647,7 +647,7 @@ def something(request):
647
648
gc.collect()
649
leaked_types = sum(1 for _ in gc.garbage
650
- if 'PseudoFixtureDef' in safe_str(_))
+ if isinstance(_, PseudoFixtureDef))
651
652
gc.garbage[:] = []
653
0 commit comments