Ejemplo n.º 1
0
import unittest

import test_util
import test_fragmentation
import test_outputformats
import test_standardwriter
import test_gamessfmooutput

if __name__ == '__main__':
    suite = unittest.TestSuite()
    suite.addTest(test_util.suite())
    suite.addTest(test_fragmentation.suite())
    suite.addTest(test_outputformats.suite())
    suite.addTest(test_standardwriter.suite())
    suite.addTest(test_gamessfmooutput.suite())
    unittest.TextTestRunner().run(suite)
Ejemplo n.º 2
0
tests.addTests(test_cnc_table.suite())
tests.addTests(test_filehash.suite())
tests.addTests(test_keymanager.suite())
tests.addTests(test_model.suite())
tests.addTests(test_scanhandlers_dummy.suite())

# TODO: add these test handlers based on availablility of scanners.
#tests.addTests(test_scanhandlers_mcafee.suite())
#tests.addTests(test_scanhandlers_msseccli.suite())

tests.addTests(test_scandigest.suite())
tests.addTests(test_scanlog.suite())
tests.addTests(test_containermanagers.suite())
tests.addTests(test_searchutil.suite())
tests.addTests(test_sethash.suite())
tests.addTests(test_util.suite())


def run(v=1):
    unittest.TextTestRunner(verbosity=v).run(tests)


if __name__ == "__main__":
    v = 1
    optlist, args = getopt.getopt(sys.argv[1:], 'vl:')
    options = dict(optlist)
    if '-v' in options or '-v' in args:
        v += 1
    if '-l' in options or '-l' in args:
        try: a = int(options['-l'])
        except: pass