From 80c69aac05ec006a4befc25d417e00ef36cfb119 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 2 Dec 2018 15:08:42 -0800 Subject: [PATCH] Fix incomplete test coverage around --progress argument validation. --- tests/integration/commands/test_borgmatic.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/integration/commands/test_borgmatic.py b/tests/integration/commands/test_borgmatic.py index c4dd382..ed477a8 100644 --- a/tests/integration/commands/test_borgmatic.py +++ b/tests/integration/commands/test_borgmatic.py @@ -88,6 +88,15 @@ def test_parse_arguments_with_invalid_arguments_exits(): module.parse_arguments('--posix-me-harder') +def test_parse_arguments_with_progress_and_create_flags_does_not_raise(): + module.parse_arguments('--progress', '--create', '--list') + + +def test_parse_arguments_with_progress_flag_but_no_create_flag_raises_value_error(): + with pytest.raises(ValueError): + module.parse_arguments('--progress', '--list') + + def test_parse_arguments_with_json_flag_with_list_or_info_flag_does_not_raise_any_error(): module.parse_arguments('--list', '--json') module.parse_arguments('--info', '--json')