def test_cmdify_quote_if_carets(): """Ensure arguments are quoted if they contain carets. """ script = Script('foo^bar', ['baz^rex']) assert script.cmdify() == '"foo^bar" "baz^rex"', script
def test_cmdify(): script = Script('python', ['-c', "print('hello')"]) cmd = script.cmdify() assert cmd == '"python" "-c" "print(\'hello\')"', script
def test_cmdify(): script = Script('python', ['-c', "print('hello world')"]) cmd = script.cmdify() assert cmd == 'python -c "print(\'hello world\')"', script