remove more compat code
This commit is contained in:
parent
662c245795
commit
57d628ca74
9 changed files with 37 additions and 89 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue