summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Cardona <remi.cardona@free.fr>2014-09-28 01:32:01 +0200
committerRémi Cardona <remi.cardona@free.fr>2014-09-28 01:32:01 +0200
commitd275d6f44e3d3d5c7c50c70122a2b177474dad59 (patch)
tree3a417d5eebd02d8133fca0d0f9644b78c9bda5a8
parent3460e121018b712efb2031f3c5c1576720314474 (diff)
downloadlogilab-common-d275d6f44e3d3d5c7c50c70122a2b177474dad59.tar.gz
[testlib] 'test' module from python 3 creates temporary directory on import
From the std lib: The test package is meant for internal use by Python only. It is documented for the benefit of the core developers of Python. Any use of this package outside of Python’s standard library is discouraged as code mentioned here can change or be removed without notice between releases of Python. The real issue is that in python 3, the following is done at the top of test.py: TESTDIRN = os.path.basename(tempfile.mkdtemp(dir='.')) By just importing this module, an empty directory is created. Fortunately, it sits unused in testlib. So just drop it.
-rw-r--r--testlib.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/testlib.py b/testlib.py
index a789178..be20874 100644
--- a/testlib.py
+++ b/testlib.py
@@ -82,14 +82,6 @@ except ImportError:
callable.__name__ = wrapped.__name__
return callable
return proxy
-try:
- from test import test_support
-except ImportError:
- # not always available
- class TestSupport:
- def unload(self, test):
- pass
- test_support = TestSupport()
from logilab.common.debugger import Debugger, colorize_source
from logilab.common.decorators import cached, classproperty