diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-05-09 01:15:24 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-05-08 19:15:24 -0400 |
commit | ac8c6fec5bb2be97c8dbdb2286d2688575a593f2 (patch) | |
tree | 835335d3d48d77c6d5299af723b91adc2bc857b3 /tools/util.py | |
parent | ec9080f34c936d9af56cca68de664954053bf423 (diff) |
Refactor unit test runner (#2294)
Properly discovers the permissions needed for each test.
Diffstat (limited to 'tools/util.py')
-rw-r--r-- | tools/util.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tools/util.py b/tools/util.py index 5576bef91..007e21ba1 100644 --- a/tools/util.py +++ b/tools/util.py @@ -329,28 +329,6 @@ def enable_ansi_colors_win10(): return True -def parse_unit_test_output(output, print_to_stdout): - expected = None - actual = None - result = None - for line in iter(output.readline, ''): - if expected is None: - # expect "running 30 tests" - expected = extract_number(r'running (\d+) tests', line) - elif "test result:" in line: - result = line - if print_to_stdout: - sys.stdout.write(line) - sys.stdout.flush() - # Check that the number of expected tests equals what was reported at the - # bottom. - if result: - # result should be a string like this: - # "test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; ..." - actual = extract_number(r'(\d+) passed', result) - return (actual, expected) - - def extract_number(pattern, string): matches = re.findall(pattern, string) if len(matches) != 1: |