Attempt to fix flaky test_request_garbage on Windows

Fix #3564
This commit is contained in:
Bruno Oliveira 2018-06-10 19:13:57 -03:00
parent 11705040ac
commit 5ea647a245
1 changed files with 2 additions and 2 deletions

View File

@ -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[:] = []