# HG changeset patch # User Denis Laxalde # Date 1468330207 -7200 # Node ID f79c6894381f69a02b1c9e8517506b0e3374ac05 # Parent ced4de539d66f9a7ae7057218f83a75e1c1ef391 [test] Avoid usage of lgc.testlib TestCase in unittest_cwconfig.py diff -r ced4de539d66 -r f79c6894381f cubicweb/test/unittest_cwconfig.py --- a/cubicweb/test/unittest_cwconfig.py Mon Jul 18 13:59:47 2016 +0200 +++ b/cubicweb/test/unittest_cwconfig.py Tue Jul 12 15:30:07 2016 +0200 @@ -21,13 +21,13 @@ import os import tempfile from os.path import dirname, join, abspath +import unittest from logilab.common.modutils import cleanup_sys_modules -from logilab.common.testlib import (TestCase, unittest_main, - with_tempdir) +from logilab.common.testlib import with_tempdir from logilab.common.changelog import Version -from cubicweb.devtools import ApptestConfiguration +from cubicweb.devtools import ApptestConfiguration, testlib from cubicweb.cwconfig import _find_prefix def unabsolutize(path): @@ -40,7 +40,8 @@ CUSTOM_CUBES_DIR = abspath(join(dirname(__file__), 'data', 'cubes')) -class CubicWebConfigurationTC(TestCase): +class CubicWebConfigurationTC(testlib.BaseTestCase): + def setUp(self): cleanup_sys_modules([CUSTOM_CUBES_DIR, ApptestConfiguration.CUBES_DIR]) self.config = ApptestConfiguration('data', __file__) @@ -132,7 +133,7 @@ self.assertEqual(file.__path__, [join(CUSTOM_CUBES_DIR, 'file')]) -class FindPrefixTC(TestCase): +class FindPrefixTC(unittest.TestCase): def make_dirs(self, *args): path = join(tempfile.tempdir, *args) if not os.path.exists(path): @@ -231,4 +232,4 @@ if __name__ == '__main__': - unittest_main() + unittest.main()