equal
deleted
inserted
replaced
15 # |
15 # |
16 # You should have received a copy of the GNU Lesser General Public License along |
16 # You should have received a copy of the GNU Lesser General Public License along |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
18 """unit tests for module cubicweb.server.migractions""" |
18 """unit tests for module cubicweb.server.migractions""" |
19 |
19 |
|
20 import os.path as osp |
20 from datetime import date |
21 from datetime import date |
21 import os, os.path as osp |
|
22 from contextlib import contextmanager |
22 from contextlib import contextmanager |
23 |
23 |
24 from logilab.common.testlib import unittest_main, Tags, tag |
24 from logilab.common.testlib import unittest_main, Tags, tag |
25 from logilab.common import tempattr |
25 from logilab.common import tempattr |
26 |
26 |
34 |
34 |
35 import cubicweb.devtools |
35 import cubicweb.devtools |
36 |
36 |
37 |
37 |
38 HERE = osp.dirname(osp.abspath(__file__)) |
38 HERE = osp.dirname(osp.abspath(__file__)) |
|
39 migrschema = None |
39 |
40 |
40 |
41 |
41 def setUpModule(): |
42 def setUpModule(): |
42 startpgcluster(__file__) |
43 startpgcluster(__file__) |
43 |
44 |
44 |
45 |
45 migrschema = None |
|
46 def tearDownModule(*args): |
46 def tearDownModule(*args): |
47 global migrschema |
47 global migrschema |
48 del migrschema |
48 del migrschema |
49 if hasattr(MigrationCommandsTC, 'origschema'): |
49 if hasattr(MigrationCommandsTC, 'origschema'): |
50 del MigrationCommandsTC.origschema |
50 del MigrationCommandsTC.origschema |