Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 3985c24

Browse files
make tests slightly faster on PyPy
1 parent aa2a3a4 commit 3985c24

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/unittest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import hmac
2020
import inspect
2121
import logging
22+
import platform
2223
import time
2324
from typing import Callable, Dict, Iterable, Optional, Tuple, Type, TypeVar, Union
2425

@@ -126,7 +127,8 @@ def tearDown(orig):
126127
ret = orig()
127128
# force a GC to workaround problems with deferreds leaking logcontexts when
128129
# they are GCed (see the logcontext docs)
129-
gc.collect()
130+
if platform.python_implementation() != "PyPy":
131+
gc.collect()
130132
set_current_context(SENTINEL_CONTEXT)
131133

132134
return ret

0 commit comments

Comments
 (0)