Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
MasloMaslane committed Apr 5, 2024
1 parent 61e7324 commit e3b75e7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/commands/run/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,3 +785,30 @@ def test_ghost_checker(create_package):
with pytest.raises(SystemExit) as e:
command.run(args)
assert e.value.code == 1


@pytest.mark.parametrize("create_package", [get_simple_package_path()], indirect=True)
def test_ignore_expected_flag(create_package, capsys):
"""
Test flag --ignore-expected.
"""
config = package_util.get_config()
del config["sinol_expected_scores"]
util.save_config(config)

package_path = create_package
create_ins_outs(package_path)
parser = configure_parsers()
args = parser.parse_args(["run"])
command = Command()

with pytest.raises(SystemExit):
command.run(args)
out = capsys.readouterr().out
assert "Use flag --apply-suggestions to apply suggestions." in out

args = parser.parse_args(["run", "--ignore-expected"])
command = Command()
command.run(args)
out = capsys.readouterr().out
assert "Ignoring expected scores." in out

0 comments on commit e3b75e7

Please sign in to comment.