equal
deleted
inserted
replaced
3 import unittest |
3 import unittest |
4 |
4 |
5 from tests import test_rowdict |
5 from tests import test_rowdict |
6 from tests import testpgmanager |
6 from tests import testpgmanager |
7 |
7 |
|
8 enable_mysql = True |
|
9 try: |
|
10 from tests import test_mymanager |
|
11 except ImportError: |
|
12 enable_mysql = False |
|
13 |
8 loader = unittest.TestLoader() |
14 loader = unittest.TestLoader() |
9 |
15 |
10 suite = unittest.TestSuite() |
16 suite = unittest.TestSuite() |
11 suite.addTests(loader.loadTestsFromModule(test_rowdict)) |
17 suite.addTests(loader.loadTestsFromModule(test_rowdict)) |
12 suite.addTests(loader.loadTestsFromModule(testpgmanager)) |
18 suite.addTests(loader.loadTestsFromModule(testpgmanager)) |
13 |
19 |
|
20 if enable_mysql: |
|
21 suite.addTests(loader.loadTestsFromModule(test_mymanager)) |
|
22 |
14 runner = unittest.TextTestRunner(verbosity=2) |
23 runner = unittest.TextTestRunner(verbosity=2) |
15 result = runner.run(suite) |
24 result = runner.run(suite) |
16 |
25 |