diff -r 3ab0a6692e25 Lib/test/libregrtest/main.py --- a/Lib/test/libregrtest/main.py Mon Dec 19 13:12:08 2016 +0100 +++ b/Lib/test/libregrtest/main.py Wed Dec 21 15:25:06 2016 +0100 @@ -179,17 +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_]+)\b(?:\.py)?') - 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() match = regex.search(line) if match is not None: - self.tests.append(match.group(1)) + self.tests.append(match.group(0)) removepy(self.tests)