def test_all(pathlist=None, stop_on_failure=True): if pathlist is not None: device.file_pathlist = pathlist else: device.file_pathlist = util.PathList([ '.', os.path.join(os.path.dirname(os.path.abspath(__file__)), 'devices') ]) count_passed = 0 count_failed = 0 count_run = 0 for test in test_device_tests: count_run += 1 if test(pathlist) is True: count_passed += 1 else: count_failed += 1 if stop_on_failure is True: break print 'Test device module: total tests: %d tests run: %d tests passed: %d tests failed: %d' % ( len(test_device_tests), count_run, count_passed, count_failed) return (count_run, count_passed, count_failed)
def test_all(pathlist=None, stop_on_failure=True, raw_traceback=False): if pathlist is None: pathlist = util.PathList([ '.', os.path.join(os.path.dirname(os.path.abspath(__file__)), 'devices') ]) count_passed = 0 count_failed = 0 count_run = 0 for test in tests: count_run += 1 if test(pathlist, raw_traceback=raw_traceback) is True: count_passed += 1 else: count_failed += 1 if stop_on_failure is True: break print( 'Test data module: total tests: %d tests run: %d tests passed: %d tests failed: %d' % (len(tests), count_run, count_passed, count_failed)) return (count_run, count_passed, count_failed)
def setUp(self): path = os.path.abspath(__file__) self.pathlist = util.PathList(['.', os.path.join(os.path.dirname(path), 'devices')]) device.check_for_models(pathlist=self.pathlist)