diff -r b81adb5e32f9 -r 09273cb083e7 web/test/unittest_propertysheet.py --- a/web/test/unittest_propertysheet.py Fri Feb 20 16:17:51 2015 +0100 +++ b/web/test/unittest_propertysheet.py Wed Jun 11 15:33:09 2014 +0200 @@ -1,13 +1,21 @@ import os from os.path import join, dirname from shutil import rmtree +import errno +import tempfile from logilab.common.testlib import TestCase, unittest_main from cubicweb.web.propertysheet import PropertySheet, lazystr DATADIR = join(dirname(__file__), 'data') -CACHEDIR = join(DATADIR, 'uicache') + +try: + os.makedirs(join(DATADIR, 'uicache')) +except OSError as err: + if err.errno != errno.EEXIST: + raise +CACHEDIR = tempfile.mkdtemp(dir=join(DATADIR, 'uicache')) class PropertySheetTC(TestCase):