def global_setup(self): """Executed once when the test runner is being set up.""" self.directory = os.path.join(os.getcwd(), self.runner.options.coverage) # FIXME: This shouldn't rely on the find feature directly. self.tracer = TestTrace(test_dirs(self.runner.options, {}), trace=False, count=True) self.tracer.start()
def find_suites(options): tests_pattern = options.tests_pattern seen = set() for (p, package) in find.test_dirs(options, {}): if p in seen: continue for dirpath, dirs, files in os.walk(p): d = os.path.split(dirpath)[1] if not tests_pattern(d): # not a tests directory continue for filename in files: root, ext = os.path.splitext(filename) if ext == '.js' and root.startswith('buster'): # This tests dir is a buster test suite # TODO individual test cases for every test file specified # in buster.js yield unittest.TestSuite([case.BusterJSTestCase( os.path.join(dirpath, filename), test_dir=p)]) seen.add(p)
def find_suites(options): tests_pattern = options.tests_pattern seen = set() for (p, package) in find.test_dirs(options, {}): if p in seen: continue for dirpath, dirs, files in os.walk(p): d = os.path.split(dirpath)[1] if not tests_pattern(d): # not a tests directory continue for filename in files: root, ext = os.path.splitext(filename) if ext == '.js' and root.startswith('buster'): # This tests dir is a buster test suite # TODO individual test cases for every test file specified # in buster.js yield unittest.TestSuite([ case.BusterJSTestCase(os.path.join(dirpath, filename), test_dir=p) ]) seen.add(p)