From 91315505723ab610cbaadd814f25950766653d70 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Fri, 13 Mar 2020 13:38:04 +0000 Subject: [PATCH] TEST: unit test for prepareArgs --- tests/test_run.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_run.py b/tests/test_run.py index 8e7a7a8b1..9952c7e74 100644 --- a/tests/test_run.py +++ b/tests/test_run.py @@ -36,6 +36,17 @@ def mkexec(path, contents): os.chmod(path, 0o755) +def test_prepareArgs(): + tests = [ + ('a b c', ['a', 'b', 'c']), + (['a', 'b', 'c'], ['a', 'b', 'c']), + ('abc "woop woop"', ['abc', 'woop woop']), + (['abc', 'woop woop'], ['abc', 'woop woop']), + ] + + for args, expected in tests: + assert run.prepareArgs((args, )) == expected + def test_run(): test_script = textwrap.dedent(""" -- GitLab