summaryrefslogtreecommitdiff
path: root/test/testlib/compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/testlib/compat.py')
-rw-r--r--test/testlib/compat.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/test/testlib/compat.py b/test/testlib/compat.py
deleted file mode 100644
index 73eb2d651..000000000
--- a/test/testlib/compat.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import types
-import __builtin__
-
-__all__ = '_function_named', 'callable'
-
-
-def _function_named(fn, newname):
- try:
- fn.__name__ = newname
- except:
- fn = types.FunctionType(fn.func_code, fn.func_globals, newname,
- fn.func_defaults, fn.func_closure)
- return fn
-
-try:
- callable = __builtin__.callable
-except NameError:
- def callable(fn): return hasattr(fn, '__call__')
-