Ejemplo n.º 1
0
 def test_popen_with_sudo_python(self):
     spec = XSpec("popen//python=sudo python3")
     assert popen_args(spec) == [
         'sudo', 'python3', '-u', '-c',
         'import sys;exec(eval(sys.stdin.readline()))'
     ]
Ejemplo n.º 2
0
def test_popen_args(spec, expected_args):
    expected_args = expected_args + [
        '-u', '-c', gateway_io.popen_bootstrapline]
    args = gateway_io.popen_args(execnet.XSpec(spec))
    assert args == expected_args
Ejemplo n.º 3
0
def test_popen_args(spec, expected_args):
    expected_args = expected_args + [
        '-u', '-c', gateway_io.popen_bootstrapline]
    args = gateway_io.popen_args(execnet.XSpec(spec))
    assert args == expected_args