Merge pull request #3565 from nicoddemus/xfail-test-request-garbage
Attempt to fix test_request_garbage on Windows
This commit is contained in:
commit
04b65cfba0
|
@ -630,7 +630,7 @@ class TestRequestBasic(object):
|
|||
"""
|
||||
import sys
|
||||
import pytest
|
||||
from _pytest.compat import safe_str
|
||||
from _pytest.fixtures import PseudoFixtureDef
|
||||
import gc
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
@ -647,7 +647,7 @@ class TestRequestBasic(object):
|
|||
|
||||
gc.collect()
|
||||
leaked_types = sum(1 for _ in gc.garbage
|
||||
if 'PseudoFixtureDef' in safe_str(_))
|
||||
if isinstance(_, PseudoFixtureDef))
|
||||
|
||||
gc.garbage[:] = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue