mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
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
This commit is contained in:
parent
bbc8de0c7a
commit
43c6c1a9f5
17 changed files with 283 additions and 278 deletions
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
|
||||
from http_server import spawn
|
||||
from util import DenoTestCase, mkdtemp, tests_path, run_output, test_main
|
||||
import http_server
|
||||
from test_util import DenoTestCase, run_tests
|
||||
from util import mkdtemp, tests_path, run_output
|
||||
|
||||
|
||||
class FetchTest(DenoTestCase):
|
||||
|
@ -26,5 +26,5 @@ class FetchTest(DenoTestCase):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
with spawn():
|
||||
test_main()
|
||||
with http_server.spawn():
|
||||
run_tests()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue