Refs #28954 -- Removed remaining Jython-specific code from dispatch tests.

Missed in 23b21db31b.
This commit is contained in:
Nick Pope 2019-11-06 15:08:12 +00:00 committed by Carlton Gibson
parent a3fc24f014
commit a2d894b2e4
1 changed files with 1 additions and 9 deletions

View File

@ -1,6 +1,5 @@
import gc import gc
import sys import sys
import time
import weakref import weakref
from types import TracebackType from types import TracebackType
@ -8,14 +7,7 @@ from django.dispatch import Signal, receiver
from django.test import SimpleTestCase from django.test import SimpleTestCase
from django.test.utils import override_settings from django.test.utils import override_settings
if sys.platform.startswith('java'): if hasattr(sys, 'pypy_version_info'):
def garbage_collect():
# Some JVM GCs will execute finalizers in a different thread, meaning
# we need to wait for that to complete before we go on looking for the
# effects of that.
gc.collect()
time.sleep(0.1)
elif hasattr(sys, "pypy_version_info"):
def garbage_collect(): def garbage_collect():
# Collecting weakreferences can take two collections on PyPy. # Collecting weakreferences can take two collections on PyPy.
gc.collect() gc.collect()