diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-06-03 18:35:55 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-03 12:35:55 -0400 |
commit | 43c6c1a9f58a8d423a2d55092609e620f9765bcf (patch) | |
tree | f0bc5783b40bbde27dc52ff01552e21258e59324 /tools/util_test.py | |
parent | bbc8de0c7a6a086ea7b0b79c6f5b005f9f374a7d (diff) |
Refactor test infrastructure (#2432)
* use subclass of unittest.TestCase for all test cases
* allow to run single test file (eg. python tools/integration_tests.py)
* test filtering (via --pattern/-p CLI flag)
* use common CLI parser for all tests:
usage: test.py [-h] [--failfast] [--verbose] [--executable EXECUTABLE]
[--release] [--pattern PATTERN] [--build-dir BUILD_DIR]
optional arguments:
-h, --help show this help message and exit
--failfast, -f Stop on first failure
--verbose, -v Verbose output
--executable EXECUTABLE
Use external executable of Deno
--release Test against release executable
--pattern PATTERN, -p PATTERN
Run tests that match provided pattern
--build-dir BUILD_DIR
Deno build directory
* respect NO_COLOR variable
Diffstat (limited to 'tools/util_test.py')
-rwxr-xr-x | tools/util_test.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tools/util_test.py b/tools/util_test.py index 5db50e420..fb6c59f18 100755 --- a/tools/util_test.py +++ b/tools/util_test.py @@ -1,16 +1,9 @@ # Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import os -import sys -from util import ( - DenoTestCase, - pattern_match, - parse_exit_code, - shell_quote_win, - parse_wrk_output, - root_path, - test_main, -) +from test_util import DenoTestCase, run_tests +from util import (pattern_match, parse_exit_code, shell_quote_win, + parse_wrk_output, root_path) class TestUtil(DenoTestCase): @@ -70,4 +63,4 @@ class TestUtil(DenoTestCase): if __name__ == '__main__': - test_main() + run_tests() |