diff options
| author | Nick Pope <nick@nickpope.me.uk> | 2023-12-04 11:23:08 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-12-06 09:26:11 +0100 |
| commit | fb9216382a387685e1082ac97caa3feaf3d5fe80 (patch) | |
| tree | 198e324293a0e9266197aa4db74ea1969680f996 /tests/dispatch | |
| parent | 1c3614e306e80d5a57c52d36c2a1868e1e5f9ab3 (diff) | |
Refs #34986 -- Moved garbage_collect() helper to django.test.utils.
Diffstat (limited to 'tests/dispatch')
| -rw-r--r-- | tests/dispatch/tests.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/dispatch/tests.py b/tests/dispatch/tests.py index 8e72e626dd..18426d8dd1 100644 --- a/tests/dispatch/tests.py +++ b/tests/dispatch/tests.py @@ -1,23 +1,9 @@ -import gc import weakref from types import TracebackType from django.dispatch import Signal, receiver from django.test import SimpleTestCase -from django.test.utils import override_settings -from django.utils.version import PYPY - -if PYPY: - - def garbage_collect(): - # Collecting weakreferences can take two collections on PyPy. - gc.collect() - gc.collect() - -else: - - def garbage_collect(): - gc.collect() +from django.test.utils import garbage_collect, override_settings def receiver_1_arg(val, **kwargs): |
