Skip to content

Commit

Permalink
Back to capfd
Browse files Browse the repository at this point in the history
  • Loading branch information
ClintonWB-EBSCO committed Oct 19, 2023
1 parent cdc987d commit b8208d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ def test_task_name_arg_exception(insecure_inputs, secure_inputs):
"sys.argv",
["__main__.py", "tests/test_data/main/invalid_json.json", "task_name"],
)
def test_json_fail(capsys):
def test_json_fail(capfd):
with pytest.raises(SystemExit):
__main__.main()
assert capsys.readouterr().out == dedent(
assert capfd.readouterr().out == dedent(
"""\
{
Expand All @@ -173,10 +173,10 @@ def test_json_fail(capsys):
"sys.argv",
["__main__.py", "tests/test_data/main/json_not_matching_schema.json", "task_name"],
)
def test_validation_fail(capsys):
def test_validation_fail(capfd):
with pytest.raises(SystemExit):
__main__.main()
assert capsys.readouterr().out == dedent(
assert capfd.readouterr().out == dedent(
"""\
[
{
Expand All @@ -199,10 +199,10 @@ def test_validation_fail(capsys):
"sys.argv",
["__main__.py", "tests/test_data/main/basic_config.json", "task_name"],
)
def test_migration_task_exhaustion(capsys):
def test_migration_task_exhaustion(capfd):
with pytest.raises(SystemExit):
__main__.main()
assert capsys.readouterr().out == dedent(
assert capfd.readouterr().out == dedent(
"""\
Referenced task name task_name not found in the configuration file. Use one of task
Halting...
Expand Down

0 comments on commit b8208d9

Please sign in to comment.