예제 #1
0
def test_from_programoutput_node_extraargs():
    node = program_output()
    node['command'] = 'echo spam'
    node['use_shell'] = False
    node['hide_standard_error'] = False
    node['extraargs'] = 'with eggs'
    command = Command.from_program_output_node(node)
    assert command.command == 'echo spam with eggs'
예제 #2
0
 def test_from_programoutput_node_extraargs(self):
     node = program_output()
     node['command'] = 'echo spam'
     node['use_shell'] = False
     node['hide_standard_error'] = False
     node['extraargs'] = 'with eggs'
     node['working_directory'] = '/'
     command = Command.from_program_output_node(node)
     self.assertEqual(command.command, 'echo spam with eggs')
예제 #3
0
def test_from_programoutput_node():
    node = program_output()
    node['command'] = 'echo spam'
    node['use_shell'] = False
    node['hide_standard_error'] = False
    command = Command.from_program_output_node(node)
    assert command.command == 'echo spam'
    assert not command.shell
    assert not command.hide_standard_error
    node['use_shell'] = True
    assert Command.from_program_output_node(node).shell
    assert not Command.from_program_output_node(node).hide_standard_error
    node['hide_standard_error'] = True
    assert Command.from_program_output_node(node).hide_standard_error
예제 #4
0
def test_from_programoutput_node():
    node = program_output()
    node['command'] = 'echo spam'
    node['use_shell'] = False
    node['hide_standard_error'] = False
    node['working_directory'] = '/spam/with/eggs'
    command = Command.from_program_output_node(node)
    assert command.command == 'echo spam'
    assert command.working_directory == '/spam/with/eggs'
    assert not command.shell
    assert not command.hide_standard_error
    node['use_shell'] = True
    assert Command.from_program_output_node(node).shell
    assert not Command.from_program_output_node(node).hide_standard_error
    node['hide_standard_error'] = True
    assert Command.from_program_output_node(node).hide_standard_error
예제 #5
0
 def test_from_programoutput_node(self):
     node = program_output()
     node['command'] = 'echo spam'
     node['use_shell'] = False
     node['hide_standard_error'] = False
     node['working_directory'] = '/spam/with/eggs'
     command = Command.from_program_output_node(node)
     self.assertEqual(command.command, 'echo spam')
     self.assertEqual(command.working_directory, '/spam/with/eggs')
     self.assertFalse(command.shell)
     self.assertFalse(command.hide_standard_error)
     node['use_shell'] = True
     self.assertTrue(Command.from_program_output_node(node).shell)
     self.assertFalse(
         Command.from_program_output_node(node).hide_standard_error)
     node['hide_standard_error'] = True
     self.assertTrue(
         Command.from_program_output_node(node).hide_standard_error)