[test] create temporary directory with meaningfull prefix stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Thu, 23 Feb 2012 11:57:35 +0100
branchstable
changeset 8257 d54fc706d623
parent 8256 852c73392b00
child 8258 88a7d2c49d39
child 8261 d4d9c88d4a5f
[test] create temporary directory with meaningfull prefix It will help cleanup temporary directory when cubicweb test failed to cleanup themself.
devtools/devctl.py
devtools/qunit.py
--- a/devtools/devctl.py	Mon Feb 20 15:16:55 2012 +0100
+++ b/devtools/devctl.py	Thu Feb 23 11:57:35 2012 +0100
@@ -303,7 +303,7 @@
         from logilab.common.shellutils import globfind, find, rm
         from logilab.common.modutils import get_module_files
         from cubicweb.i18n import extract_from_tal, execute
-        tempdir = tempfile.mkdtemp()
+        tempdir = tempfile.mkdtemp(prefix='cw-')
         cwi18ndir = WebConfiguration.i18n_lib_dir()
         print '-> extract schema messages.'
         schemapot = osp.join(tempdir, 'schema.pot')
--- a/devtools/qunit.py	Mon Feb 20 15:16:55 2012 +0100
+++ b/devtools/qunit.py	Thu Feb 23 11:57:35 2012 +0100
@@ -64,7 +64,7 @@
 
     def __init__(self, url=None):
         self._process = None
-        self._tmp_dir = mkdtemp()
+        self._tmp_dir = mkdtemp(prefix='cwtest-ffxprof-')
         self._profile_data = {'uid': uuid4()}
         self._profile_name = self.profile_name_mask % self._profile_data
         fnull = open(os.devnull, 'w')