Skip to content

Commit 166920f

Browse files
committed
more tests for argsParser added
1 parent 8d05845 commit 166920f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_argsParser.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ def test_arg_parser_with_source_file(mock_config):
3636
assert args.output == "result"
3737

3838

39+
# Test with source file
40+
def test_arg_parser_with_more_than_two_source_files(mock_config):
41+
with patch("sys.argv", ["code_mage.py", "example.js", "sample.js"]):
42+
args = arg_parser(mock_config)
43+
assert args.source_files == ["example.js", "sample.js"]
44+
assert args.language == "python"
45+
assert args.output == "result"
46+
47+
3948
# Test with --language option
4049
def test_arg_parser_with_language_option(mock_config):
4150
with patch("sys.argv", ["code_mage.py", "--language", "java"]):

0 commit comments

Comments
 (0)