From 166920f8da5a7de0e8529b4fbab6274626ce2815 Mon Sep 17 00:00:00 2001 From: gitdevjin Date: Thu, 14 Nov 2024 00:18:14 -0500 Subject: [PATCH] more tests for argsParser added --- tests/test_argsParser.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_argsParser.py b/tests/test_argsParser.py index 1fd7b9e..06f724a 100644 --- a/tests/test_argsParser.py +++ b/tests/test_argsParser.py @@ -36,6 +36,15 @@ def test_arg_parser_with_source_file(mock_config): assert args.output == "result" +# Test with source file +def test_arg_parser_with_more_than_two_source_files(mock_config): + with patch("sys.argv", ["code_mage.py", "example.js", "sample.js"]): + args = arg_parser(mock_config) + assert args.source_files == ["example.js", "sample.js"] + assert args.language == "python" + assert args.output == "result" + + # Test with --language option def test_arg_parser_with_language_option(mock_config): with patch("sys.argv", ["code_mage.py", "--language", "java"]):