diff options
author | Raymond Hettinger <python@rcn.com> | 2017-02-06 07:15:57 -0800 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2017-02-06 07:15:57 -0800 |
commit | 826745ba953b4ef23462fb0bc2d7b3db23b51d89 (patch) | |
tree | 7789cc87df07c2786c40e6888cbb532a94ce6334 /Lib/test/libregrtest/main.py | |
parent | 95b272b4e0d5438a12702e51e05d03f5a5a8e505 (diff) | |
parent | 515f1cf20f4e9656b1bcda236bad8ed0e33770f0 (diff) | |
download | cpython-826745ba953b4ef23462fb0bc2d7b3db23b51d89.tar.gz |
merge
Diffstat (limited to 'Lib/test/libregrtest/main.py')
-rw-r--r-- | Lib/test/libregrtest/main.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py index f0effc973c..de1f4f9505 100644 --- a/Lib/test/libregrtest/main.py +++ b/Lib/test/libregrtest/main.py @@ -107,7 +107,7 @@ class Regrtest: self.test_times.append((test_time, test)) if ok == PASSED: self.good.append(test) - elif ok == FAILED: + elif ok in (FAILED, CHILD_ERROR): self.bad.append(test) elif ok == ENV_CHANGED: self.environment_changed.append(test) @@ -179,19 +179,14 @@ class Regrtest: self.tests = [] # regex to match 'test_builtin' in line: # '0:00:00 [ 4/400] test_builtin -- test_dict took 1 sec' - regex = (r'^(?:[0-9]+:[0-9]+:[0-9]+ *)?' - r'(?:\[[0-9/ ]+\] *)?' - r'(test_[a-zA-Z0-9_]+)') - regex = re.compile(regex) + regex = re.compile(r'\btest_[a-zA-Z0-9_]+\b') with open(os.path.join(support.SAVEDCWD, self.ns.fromfile)) as fp: for line in fp: + line = line.split('#', 1)[0] line = line.strip() - if line.startswith('#'): - continue - match = regex.match(line) - if match is None: - continue - self.tests.append(match.group(1)) + match = regex.search(line) + if match is not None: + self.tests.append(match.group()) removepy(self.tests) |