From 5960e398ecab914effec821cc6da5f3a091fdb50 Mon Sep 17 00:00:00 2001 From: Andy Hayden Date: Sat, 8 Jun 2019 04:46:57 -0700 Subject: make tests quieter (#2468) Don't mix every http request in with the tests output. Don't print that the file servers are starting unless -vv flag is passed. Capture the output of run with run_output which returns stdout, stderr and exit_code. Test against this rather than relying on sys.exit. --- tools/deno_dir_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/deno_dir_test.py') diff --git a/tools/deno_dir_test.py b/tools/deno_dir_test.py index 052516d0e..ce5cffa90 100755 --- a/tools/deno_dir_test.py +++ b/tools/deno_dir_test.py @@ -5,7 +5,7 @@ import os from test_util import DenoTestCase, run_tests -from util import mkdtemp, rmtree, run +from util import mkdtemp, rmtree, run_output class TestDenoDir(DenoTestCase): @@ -38,7 +38,8 @@ class TestDenoDir(DenoTestCase): def run_deno(self, deno_dir=None): cmd = [self.deno_exe, "run", "tests/002_hello.ts"] deno_dir_env = {"DENO_DIR": deno_dir} if deno_dir is not None else None - run(cmd, quiet=True, env=deno_dir_env) + res = run_output(cmd, quiet=True, env=deno_dir_env) + self.assertEqual(res.code, 0) if __name__ == '__main__': -- cgit v1.2.3