diff options
| author | Stefan Behnel <stefan_ml@behnel.de> | 2020-04-30 12:24:13 +0200 |
|---|---|---|
| committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-05-01 08:38:15 +0200 |
| commit | db4241cfab0d2547bd2f75515f54d390531c5a44 (patch) | |
| tree | 2f3781e30352c3761c352c22620d09a883208fa3 | |
| parent | 0e8bc15d4b2eec1b04c9250e023475a382e37539 (diff) | |
| download | cython-db4241cfab0d2547bd2f75515f54d390531c5a44.tar.gz | |
Remove Py2.4- compatibility fallback.
| -rwxr-xr-x | runtests.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/runtests.py b/runtests.py index 3b4d8adfb..74b6691c1 100755 --- a/runtests.py +++ b/runtests.py @@ -21,6 +21,7 @@ import warnings import zlib import glob from contextlib import contextmanager +from collections import defaultdict try: import platform @@ -47,26 +48,6 @@ except ImportError: # No threads, no problems threading = None try: - from collections import defaultdict -except ImportError: - class defaultdict(object): - def __init__(self, default_factory=lambda : None): - self._dict = {} - self.default_factory = default_factory - def __getitem__(self, key): - if key not in self._dict: - self._dict[key] = self.default_factory() - return self._dict[key] - def __setitem__(self, key, value): - self._dict[key] = value - def __contains__(self, key): - return key in self._dict - def __repr__(self): - return repr(self._dict) - def __nonzero__(self): - return bool(self._dict) - -try: from unittest import SkipTest except ImportError: class SkipTest(Exception): # don't raise, only provided to allow except-ing it! |
