os.environ["SELFTEST_INTERFACES"] = "" if opts.quick: os.environ["SELFTEST_QUICK"] = "1" else: os.environ["SELFTEST_QUICK"] = "" os.environ["SELFTEST_MAXTIME"] = str(torture_maxtime) available = [] for fn in opts.testlist: for testsuite in testlist.read_testlist_file(fn): if not testlist.should_run_test(tests, testsuite): continue name = testsuite[0] if (includes is not None and testlist.find_in_list(includes, name) is not None): continue available.append(testsuite) if opts.load_list: restricted_mgr = testlist.RestrictedTestManager.from_path(opts.load_list) else: restricted_mgr = None for testsuite in available: name = testsuite[0] skipreason = skip(name) if restricted_mgr is not None: match = restricted_mgr.should_run_testsuite(name) if match == []: continue
def skip(name): return testlist.find_in_list(excludes, name)
def test_no_reason(self): self.assertEquals("because", find_in_list([("foo.*bar", "because")], "foo.bla.bar"))
def test_empty(self): self.assertIs(None, find_in_list([], "foo.test"))
def test_no_reason(self): self.assertEquals( "because", find_in_list([("foo.*bar", "because")], "foo.bla.bar"))
else: os.environ["SELFTEST_INTERFACES"] = "" if opts.quick: os.environ["SELFTEST_QUICK"] = "1" else: os.environ["SELFTEST_QUICK"] = "" os.environ["SELFTEST_MAXTIME"] = str(torture_maxtime) available = [] for fn in opts.testlist: for testsuite in testlist.read_testlist_file(fn): if not testlist.should_run_test(tests, testsuite): continue name = testsuite[0] if includes is not None and testlist.find_in_list(includes, name) is not None: continue available.append(testsuite) if opts.load_list: restricted_mgr = testlist.RestrictedTestManager.from_path(opts.load_list) else: restricted_mgr = None for testsuite in available: name = testsuite[0] skipreason = skip(name) if restricted_mgr is not None: match = restricted_mgr.should_run_testsuite(name) if match == []: continue