From 43c6c1a9f58a8d423a2d55092609e620f9765bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 3 Jun 2019 18:35:55 +0200 Subject: 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 --- tools/is_tty_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/is_tty_test.py') diff --git a/tools/is_tty_test.py b/tools/is_tty_test.py index 79267fdd5..16a4ef255 100755 --- a/tools/is_tty_test.py +++ b/tools/is_tty_test.py @@ -1,11 +1,11 @@ #!/usr/bin/env python # Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import os -import subprocess import unittest from sys import stdin -from util import DenoTestCase, test_main, tty_capture +from test_util import DenoTestCase, run_tests +from util import tty_capture IS_TTY_TEST_TS = "tests/is_tty.ts" @@ -20,4 +20,4 @@ class TestIsTty(DenoTestCase): if __name__ == "__main__": - test_main() + run_tests() -- cgit v1.2.3