Disable tracemalloc for test_resource_warning

This commit is contained in:
Bruno Oliveira 2022-02-15 09:40:48 -03:00
parent 01a2f54954
commit b85ea2a7e3
1 changed files with 4 additions and 0 deletions

View File

@ -789,6 +789,10 @@ def test_resource_warning(pytester: Pytester, monkeypatch: pytest.MonkeyPatch) -
except ImportError:
has_tracemalloc = False
# Explicitly disable PYTHONTRACEMALLOC in case pytest's test suite is running
# with it enabled.
monkeypatch.delenv("PYTHONTRACEMALLOC", raising=False)
pytester.makepyfile(
"""
def open_file(p):