diff options
| -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! |
