예제 #1
0
 def test_task_pos_arg(self):
     got = []
     def py_callable(pos):
         got.append(pos)
     task = Task('Fake', [py_callable], pos_arg='pos')
     task.options = {}
     task.pos_arg_val = ['hi', 'there']
     my_action = task.actions[0]
     my_action.execute()
     assert [['hi', 'there']] == got, repr(got)
예제 #2
0
파일: test_action.py 프로젝트: pydoit/doit
 def test_task_pos_arg(self):
     got = []
     def py_callable(pos):
         got.append(pos)
     task = Task('Fake', [py_callable], pos_arg='pos')
     task.options = {}
     task.pos_arg_val = ['hi', 'there']
     my_action = task.actions[0]
     my_action.execute()
     assert [['hi', 'there']] == got, repr(got)
예제 #3
0
 def test_task_pos_arg(self):
     cmd = "%s %s/myecho.py" % (executable, TEST_PATH)
     cmd += " %(pos)s"
     task = Task('Fake', [cmd], pos_arg='pos')
     task.options = {}
     task.pos_arg_val = ['hi', 'there']
     my_action = task.actions[0]
     assert my_action.execute() is None
     got = my_action.out.strip()
     assert "hi there" == got
예제 #4
0
파일: test_action.py 프로젝트: pydoit/doit
 def test_task_pos_arg(self):
     cmd = "%s %s/myecho.py" % (executable, TEST_PATH)
     cmd += " %(pos)s"
     task = Task('Fake', [cmd], pos_arg='pos')
     task.options = {}
     task.pos_arg_val = ['hi', 'there']
     my_action = task.actions[0]
     assert my_action.execute() is None
     got = my_action.out.strip()
     assert "hi there" == got