We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adfe9bc commit 571a9b6Copy full SHA for 571a9b6
tests/test_argsParser.py
@@ -113,3 +113,12 @@ def test_arg_parser_token_usage_option_short(mock_config):
113
with patch("sys.argv", ["code_mage.py", "-t"]):
114
args = arg_parser(mock_config)
115
assert args.token_usage is True
116
+
117
118
+# Test invalid flag argument option
119
+def test_arg_parser_invalid_option():
120
+ with patch("sys.argv", ["code_mage.py", "--invalid"]):
121
+ with pytest.raises(SystemExit) as excinfo:
122
+ arg_parser({})
123
+ assert excinfo.type is SystemExit
124
+ assert excinfo.value.code != 0
0 commit comments