Remove argv check. Check is already done in parse_cli_args and should be sys.argv[1:]. (#838)
diff --git a/mobly/suite_runner.py b/mobly/suite_runner.py
index 037476c..72732b5 100644
--- a/mobly/suite_runner.py
+++ b/mobly/suite_runner.py
@@ -138,8 +138,6 @@
Args:
argv: A list that is then parsed as CLI args. If None, defaults to sys.argv.
"""
- if argv is None:
- argv = sys.argv
cli_args = _parse_cli_args(argv)
test_configs = config_parser.load_test_config_file(cli_args.config)
config_count = len(test_configs)
diff --git a/tests/mobly/suite_runner_test.py b/tests/mobly/suite_runner_test.py
index 653bbfe..976e7ef 100755
--- a/tests/mobly/suite_runner_test.py
+++ b/tests/mobly/suite_runner_test.py
@@ -146,7 +146,7 @@
MagicDevice: '*'
""")
- mock_cli_args = [f'--config={tmp_file_path}']
+ mock_cli_args = ['test_binary', f'--config={tmp_file_path}']
with mock.patch.object(sys, 'argv', new=mock_cli_args):
suite_runner.run_suite_class()