def test_processing_mapping(): mkf = MakefileParser() the_tests = mkf.test_algos() clients = get_client_apps() already_tested = set() for t in the_tests: test_name = 'test_%s' % t if the_tests[t][0].split(" ")[0] in clients: skip = False if the_tests[t][1] is None: skip = True else: if the_tests[t][1] == "": skip = True if not skip: runnable = the_tests[t][0].split(" ")[0] if runnable not in already_tested: test = ut_generator(test_name, the_tests[t]) setattr(TestSequence, test_name, test) already_tested.add(runnable) suite = unittest.TestLoader().loadTestsFromTestCase(TestSequence) unittest.TextTestRunner(verbosity=2).run(suite)
def unfiltered_processing_mapping(): mkf = MakefileParser() the_tests = mkf.test_algos() for t in the_tests: test_name = 'test_std_%s' % t if the_tests[t][1] is None: skip = True else: if the_tests[t][1] == "": skip = True if not skip: test = ut_generator(test_name, the_tests[t]) setattr(TestSequence, test_name, test) suite = unittest.TestLoader().loadTestsFromTestCase(TestSequence) unittest.TextTestRunner(verbosity=2).run(suite)
if the_tests[t][0].split(" ")[0] in clients: skip = False if the_tests[t][1] is None: skip = True else: if the_tests[t][1] == "": skip = True if not skip: runnable = the_tests[t][0].split(" ")[0] if runnable not in already_tested: test = ut_generator(test_name, the_tests[t]) setattr(TestSequence, test_name, test) already_tested.add(runnable) suite = unittest.TestLoader().loadTestsFromTestCase(TestSequence) unittest.TextTestRunner(verbosity=2).run(suite) def test_xml_generation(): create_xml_descriptors() if __name__ == '__main__': import processing mkf = MakefileParser() the_tests = mkf.test_algos() for t in the_tests: test_name = 'test_%s' % t test = ut_generator(test_name, the_tests[t]) setattr(TestSequence, test_name, test) unittest.main()