From 54265b7a9e6f493796bcb9c65682a73013e2a600 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Mon, 1 Jan 2018 19:16:32 +0900 Subject: tests/frontend: Updating tests to use new error checks This also fixes #177 - the problem here was solved simply by passing the project directory to `cli.run(project=project...)` --- tests/frontend/show.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/frontend/show.py') diff --git a/tests/frontend/show.py b/tests/frontend/show.py index 2c2f03d96..fda5214bf 100644 --- a/tests/frontend/show.py +++ b/tests/frontend/show.py @@ -24,7 +24,7 @@ def test_show(cli, datafiles, target, format, expected): '--deps', 'none', '--format', format, target]) - assert result.exit_code == 0 + result.assert_success() if result.output.strip() != expected: raise AssertionError("Expected output:\n{}\nInstead received output:\n{}" @@ -48,7 +48,7 @@ def test_show_except(cli, datafiles, target, except_, expected): '--except', except_, target]) - assert result.exit_code == 0 + result.assert_success() results = result.output.strip().splitlines() if results != expected: @@ -68,7 +68,7 @@ def test_parallel_order(cli, tmpdir, datafiles): args = ['show', '-d', 'plan', '-f', '%{name}'] + elements result = cli.run(project=project, args=args) - assert result.exit_code == 0 + result.assert_success() # Get the planned order names = result.output.splitlines() @@ -97,7 +97,7 @@ def test_target_is_dependency(cli, tmpdir, datafiles): args = ['show', '-d', 'plan', '-f', '%{name}'] + elements result = cli.run(project=project, args=args) - assert result.exit_code == 0 + result.assert_success() # Get the planned order names = result.output.splitlines() -- cgit v1.2.1