remove more compat code

This commit is contained in:
David Lord 2020-04-04 09:25:54 -07:00
parent 662c245795
commit 57d628ca74
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
9 changed files with 37 additions and 89 deletions

View file

@ -9,7 +9,7 @@
:license: BSD-3-Clause
"""
import gc
import sys
import platform
import threading
import pytest
@ -44,6 +44,7 @@ class assert_no_leak(object):
gc.enable()
@pytest.mark.skipif(platform.python_implementation() == "PyPy", reason="CPython only")
def test_memory_consumption():
app = flask.Flask(__name__)
@ -60,11 +61,9 @@ def test_memory_consumption():
# Trigger caches
fire()
# This test only works on CPython 2.7.
if sys.version_info >= (2, 7) and not hasattr(sys, "pypy_translation_info"):
with assert_no_leak():
for _x in range(10):
fire()
with assert_no_leak():
for _x in range(10):
fire()
def test_safe_join_toplevel_pardir():