tests.py
changeset 50 f71d3abbb18f
parent 49 08e4dfe1b0cb
child 75 39f777341db4
equal deleted inserted replaced
49:08e4dfe1b0cb 50:f71d3abbb18f
     1 #!/usr/bin/env python3
     1 #!/usr/bin/env python3
     2 
     2 
     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 test_pgmanager
       
     7 from tests import test_prettysize
     7 
     8 
     8 enable_mysql = True
     9 enable_mysql = True
     9 try:
    10 try:
    10     from tests import test_mymanager
    11     from tests import test_mymanager
    11 except ImportError:
    12 except ImportError:
    13 
    14 
    14 loader = unittest.TestLoader()
    15 loader = unittest.TestLoader()
    15 
    16 
    16 suite = unittest.TestSuite()
    17 suite = unittest.TestSuite()
    17 suite.addTests(loader.loadTestsFromModule(test_rowdict))
    18 suite.addTests(loader.loadTestsFromModule(test_rowdict))
    18 suite.addTests(loader.loadTestsFromModule(testpgmanager))
    19 suite.addTests(loader.loadTestsFromModule(test_pgmanager))
       
    20 suite.addTests(loader.loadTestsFromModule(test_prettysize))
    19 
    21 
    20 if enable_mysql:
    22 if enable_mysql:
    21     suite.addTests(loader.loadTestsFromModule(test_mymanager))
    23     suite.addTests(loader.loadTestsFromModule(test_mymanager))
    22 
    24 
    23 runner = unittest.TextTestRunner(verbosity=2)
    25 runner = unittest.TextTestRunner(verbosity=2)