diff options
author | Andy Hayden <andyhayden1@gmail.com> | 2019-06-08 04:46:57 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-08 07:46:57 -0400 |
commit | 5960e398ecab914effec821cc6da5f3a091fdb50 (patch) | |
tree | bb12c155ef59b725dcc0d7a32b757e47718cdaa1 /tools/deno_dir_test.py | |
parent | 4ea2df6759abf3a99e07fe720987805075c8a18b (diff) |
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.
Diffstat (limited to 'tools/deno_dir_test.py')
-rwxr-xr-x | tools/deno_dir_test.py | 5 |
1 files changed, 3 insertions, 2 deletions
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__': |