コード例 #1
0
ファイル: test_cmd_run.py プロジェクト: JohannesBuchner/doit
 def testCustomReporter(self, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(Run, backend='dbm', dep_file=depfile_name,
                          task_list=[tasks_sample()[0]])
     cmd_run._execute(output, reporter=MyReporter)
     got = output.getvalue().split("\n")[:-1]
     assert 'MyReporter.start t1' == got[0]
コード例 #2
0
ファイル: test_cmd_run.py プロジェクト: shanbady/doit
 def testProcessRunMThread(self, dependency1, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(Run, backend="dbm", dep_file=depfile_name, task_list=tasks_sample())
     result = cmd_run._execute(output, num_process=1, par_type="thread")
     assert 0 == result
     got = output.getvalue().split("\n")[:-1]
     assert [".  t1", ".  t2", ".  g1.a", ".  g1.b", ".  t3"] == got
コード例 #3
0
 def testProcessRunMP(self, dependency1, depfile):
     output = StringIO.StringIO()
     cmd_run = Run(dep_file=depfile.name, task_list=tasks_sample())
     result = cmd_run._execute(output, num_process=1)
     assert 0 == result
     got = output.getvalue().split("\n")[:-1]
     assert [".  t1", ".  t2", ".  g1.a", ".  g1.b", ".  t3"] == got
コード例 #4
0
ファイル: test_cmd_run.py プロジェクト: swayf/doit
 def testProcessRunEmptyFilter(self, depfile):
     output = StringIO.StringIO()
     cmd_run = Run(dep_file=depfile.name, task_list=tasks_sample(),
                   sel_tasks=[])
     cmd_run._execute(output)
     got = output.getvalue().split("\n")[:-1]
     assert [] == got
コード例 #5
0
ファイル: test_cmd_run.py プロジェクト: JohannesBuchner/doit
 def testProcessRunEmptyFilter(self, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(Run, backend='dbm', dep_file=depfile_name,
                          task_list=tasks_sample(), sel_tasks=[])
     cmd_run._execute(output)
     got = output.getvalue().split("\n")[:-1]
     assert [] == got
コード例 #6
0
ファイル: test_cmd_run.py プロジェクト: shanbady/doit
 def testProcessRunSingle(self, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(Run, backend="dbm", dep_file=depfile_name, task_list=tasks_sample(), sel_tasks=["t3"])
     cmd_run._execute(output, single=True)
     got = output.getvalue().split("\n")[:-1]
     # t1 is a depenendency of t3 but not included
     assert [".  t3"] == got
コード例 #7
0
ファイル: test_cmd_run.py プロジェクト: swayf/doit
 def testProcessRunMP(self, dependency1, depfile):
     output = StringIO.StringIO()
     cmd_run = Run(dep_file=depfile.name, task_list=tasks_sample())
     result = cmd_run._execute(output, num_process=1)
     assert 0 == result
     got = output.getvalue().split("\n")[:-1]
     assert [".  t1", ".  t2", ".  g1.a", ".  g1.b", ".  t3"] == got
コード例 #8
0
ファイル: test_cmd_run.py プロジェクト: JeffSpies/doit
 def testProcessRunFilter(self, depfile_name):
     output = StringIO()
     cmd_run = Run(backend='dbm', dep_file=depfile_name,
                   task_list=tasks_sample(), sel_tasks=["g1.a"])
     cmd_run._execute(output)
     got = output.getvalue().split("\n")[:-1]
     assert [".  g1.a"] == got
コード例 #9
0
 def testInvalidReporter(self, depfile):
     output = StringIO.StringIO()
     cmd_run = Run(dep_file=depfile.name, task_list=tasks_sample())
     pytest.raises(InvalidCommand,
                   cmd_run._execute,
                   output,
                   reporter="i dont exist")
コード例 #10
0
ファイル: test_cmd_list.py プロジェクト: vvvvcp/doit
 def testFilterAll(self):
     output = StringIO()
     cmd_list = CmdFactory(List, outstream=output, task_list=tasks_sample())
     cmd_list._execute(subtasks=True, pos_args=['g1'])
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ['g1', 'g1.a', 'g1.b']
     assert expected == got
コード例 #11
0
ファイル: test_cmd_resetdep.py プロジェクト: multimeric/doit
 def test_invalid_task(self, depfile):
     output = StringIO()
     tasks = tasks_sample()
     cmd_reset = CmdFactory(ResetDep,
                            outstream=output,
                            task_list=tasks,
                            dep_manager=depfile)
     pytest.raises(InvalidCommand, cmd_reset._execute, pos_args=['xxx'])
コード例 #12
0
ファイル: test_cmd_run.py プロジェクト: swayf/doit
 def testMP_not_available(self, depfile, monkeypatch):
     # make sure MRunner wont be used
     monkeypatch.setattr(runner.MRunner, "available",
                         Mock(return_value=False))
     monkeypatch.setattr(runner.MRunner, "__init__", 'not available')
     output = StringIO.StringIO()
     cmd_run = Run(dep_file=depfile.name, task_list=tasks_sample())
     cmd_run._execute(output, num_process=3)
コード例 #13
0
ファイル: test_cmd_resetdep.py プロジェクト: rbeagrie/doit
 def test_filter(self, depfile, dependency1):
     output = StringIO()
     tasks = tasks_sample()
     cmd_reset = CmdFactory(ResetDep, outstream=output, task_list=tasks,
                            dep_manager=depfile)
     cmd_reset._execute(pos_args=['t2'])
     got = output.getvalue()
     assert "processed t2\n" == got
コード例 #14
0
 def testProcessRunEmptyFilter(self, depfile):
     output = StringIO.StringIO()
     cmd_run = Run(dep_file=depfile.name,
                   task_list=tasks_sample(),
                   sel_tasks=[])
     cmd_run._execute(output)
     got = output.getvalue().split("\n")[:-1]
     assert [] == got
コード例 #15
0
 def test_filter(self, depfile, dependency1):
     output = StringIO()
     tasks = tasks_sample()
     cmd_reset = CmdFactory(ResetDep, outstream=output, task_list=tasks,
                            dep_manager=depfile)
     cmd_reset._execute(pos_args=['t2'])
     got = output.getvalue()
     assert "processed t2\n" == got
コード例 #16
0
 def testMP_not_available(self, depfile, monkeypatch):
     # make sure MRunner wont be used
     monkeypatch.setattr(runner.MRunner, "available",
                         Mock(return_value=False))
     monkeypatch.setattr(runner.MRunner, "__init__", 'not available')
     output = StringIO.StringIO()
     cmd_run = Run(dep_file=depfile.name, task_list=tasks_sample())
     cmd_run._execute(output, num_process=3)
コード例 #17
0
ファイル: test_cmd_list.py プロジェクト: vvvvcp/doit
 def testQuiet(self):
     output = StringIO()
     tasks = tasks_sample()
     cmd_list = CmdFactory(List, outstream=output, task_list=tasks)
     cmd_list._execute()
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = [t.name for t in tasks if not t.is_subtask]
     assert sorted(expected) == got
コード例 #18
0
ファイル: test_cmd_list.py プロジェクト: vvvvcp/doit
 def testCustomTemplate(self):
     output = StringIO()
     tasks = tasks_sample()
     cmd_list = CmdFactory(List, outstream=output, task_list=tasks)
     cmd_list._execute(template='xxx {name} xxx {doc}')
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     assert 'xxx g1 xxx g1 doc string' == got[0]
     assert 'xxx t3 xxx t3 doc string' == got[3]
コード例 #19
0
ファイル: test_cmd_list.py プロジェクト: JeffSpies/doit
 def testFilterSubtask(self, depfile):
     output = StringIO()
     cmd_list = List(outstream=output, dep_file=depfile.name,
                     task_list=tasks_sample())
     cmd_list._execute(pos_args=['g1.a'])
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ['g1.a']
     assert expected == got
コード例 #20
0
ファイル: test_cmd_list.py プロジェクト: vvvvcp/doit
 def testSubTask(self):
     output = StringIO()
     tasks = tasks_sample()
     cmd_list = CmdFactory(List, outstream=output, task_list=tasks)
     cmd_list._execute(subtasks=True)
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = [t.name for t in sorted(tasks)]
     assert expected == got
コード例 #21
0
ファイル: test_cmd_run.py プロジェクト: swayf/doit
 def testCustomReporter(self, depfile):
     output = StringIO.StringIO()
     class MyReporter(reporter.ConsoleReporter):
         def get_status(self, task):
             self.outstream.write('MyReporter.start %s\n' % task.name)
     cmd_run = Run(dep_file=depfile.name, task_list=[tasks_sample()[0]])
     cmd_run._execute(output, reporter=MyReporter)
     got = output.getvalue().split("\n")[:-1]
     assert 'MyReporter.start t1' == got[0]
コード例 #22
0
ファイル: test_cmd_list.py プロジェクト: pydoit/doit
 def testSortByName(self):
     # by default, the task list should be ordered by name
     task_list = list(tasks_sample())
     output = StringIO()
     cmd_list = CmdFactory(List, outstream=output, task_list=task_list)
     cmd_list._execute()
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ['g1', 't1', 't2', 't3']
     assert expected == got
コード例 #23
0
 def testCustomReporter(self, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(Run,
                          backend='dbm',
                          dep_file=depfile_name,
                          task_list=[tasks_sample()[0]])
     cmd_run._execute(output, reporter=MyReporter)
     got = output.getvalue().split("\n")[:-1]
     assert 'MyReporter.start t1' == got[0]
コード例 #24
0
ファイル: test_cmd_list.py プロジェクト: lelit/doit
 def testFilterSubtask(self, depfile):
     output = StringIO()
     cmd_list = List(outstream=output,
                     dep_file=depfile.name,
                     task_list=tasks_sample())
     cmd_list._execute(pos_args=['g1.a'])
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ['g1.a']
     assert expected == got
コード例 #25
0
ファイル: test_cmd_list.py プロジェクト: pydoit/doit
 def testSortByDefinition(self):
     # test sorting task list by order of definition
     task_list = list(tasks_sample())
     output = StringIO()
     cmd_list = CmdFactory(List, outstream=output, task_list=task_list)
     cmd_list._execute(sort='definition')
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ['t1', 't2', 'g1', 't3']
     assert expected == got
コード例 #26
0
ファイル: test_cmd_list.py プロジェクト: swayf/doit
 def testDefault(self, depfile):
     output = StringIO()
     tasks = tasks_sample()
     cmd_list = List(outstream=output, dep_file=depfile.name,
                     task_list=tasks)
     cmd_list._execute()
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = [t.name for t in tasks if not t.is_subtask]
     assert sorted(expected) == got
コード例 #27
0
ファイル: test_cmd_list.py プロジェクト: xordspar0/doit
 def testSortByDefinition(self):
     # test sorting task list by order of definition
     task_list = list(tasks_sample())
     output = StringIO()
     cmd_list = CmdFactory(List, outstream=output, task_list=task_list)
     cmd_list._execute(sort='definition')
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ['t1', 't2', 'g1', 't3']
     assert expected == got
コード例 #28
0
ファイル: test_cmd_list.py プロジェクト: xordspar0/doit
 def testSortByName(self):
     # by default, the task list should be ordered by name
     task_list = list(tasks_sample())
     output = StringIO()
     cmd_list = CmdFactory(List, outstream=output, task_list=task_list)
     cmd_list._execute()
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ['g1', 't1', 't2', 't3']
     assert expected == got
コード例 #29
0
 def test_execute(self, depfile, dependency1):
     output = StringIO()
     tasks = tasks_sample()
     cmd_reset = CmdFactory(ResetDep, outstream=output, task_list=tasks,
                            dep_manager=depfile)
     cmd_reset._execute()
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ["processed %s" % t.name for t in tasks]
     assert sorted(expected) == sorted(got)
コード例 #30
0
ファイル: test_cmd_list.py プロジェクト: vvvvcp/doit
 def testWithPrivate(self):
     task_list = list(tasks_sample())
     task_list.append(Task("_s3", [""]))
     output = StringIO()
     cmd_list = CmdFactory(List, outstream=output, task_list=task_list)
     cmd_list._execute(private=True, pos_args=['_s3'])
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ['_s3']
     assert expected == got
コード例 #31
0
ファイル: test_cmd_resetdep.py プロジェクト: rbeagrie/doit
 def test_execute(self, depfile, dependency1):
     output = StringIO()
     tasks = tasks_sample()
     cmd_reset = CmdFactory(ResetDep, outstream=output, task_list=tasks,
                            dep_manager=depfile)
     cmd_reset._execute()
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = ["processed %s" % t.name for t in tasks]
     assert sorted(expected) == sorted(got)
コード例 #32
0
ファイル: test_cmd_run.py プロジェクト: lelit/doit
 def testProcessRunFilter(self, depfile_name):
     output = StringIO()
     cmd_run = Run(backend='dbm',
                   dep_file=depfile_name,
                   task_list=tasks_sample(),
                   sel_tasks=["g1.a"])
     cmd_run._execute(output)
     got = output.getvalue().split("\n")[:-1]
     assert [".  g1.a"] == got
コード例 #33
0
ファイル: test_cmd_run.py プロジェクト: lelit/doit
 def testProcessRunMThread(self, dependency1, depfile_name):
     output = StringIO()
     cmd_run = Run(backend='dbm',
                   dep_file=depfile_name,
                   task_list=tasks_sample())
     result = cmd_run._execute(output, num_process=1, par_type='thread')
     assert 0 == result
     got = output.getvalue().split("\n")[:-1]
     assert [".  t1", ".  t2", ".  g1.a", ".  g1.b", ".  t3"] == got
コード例 #34
0
ファイル: test_cmd_run.py プロジェクト: JohannesBuchner/doit
 def testPluginReporter(self, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(
         Run, backend='dbm',
         dep_file=depfile_name,
         task_list=[tasks_sample()[0]],
         config={'REPORTER':{'my': 'tests.test_cmd_run:MyReporter'}})
     cmd_run._execute(output, reporter='my')
     got = output.getvalue().split("\n")[:-1]
     assert 'MyReporter.start t1' == got[0]
コード例 #35
0
ファイル: test_cmd_run.py プロジェクト: lelit/doit
 def testInvalidParType(self, dependency1, depfile_name):
     output = StringIO()
     cmd_run = Run(backend='dbm',
                   dep_file=depfile_name,
                   task_list=tasks_sample())
     pytest.raises(InvalidCommand,
                   cmd_run._execute,
                   output,
                   num_process=1,
                   par_type='not_exist')
コード例 #36
0
ファイル: test_cmd_run.py プロジェクト: lelit/doit
 def testProcessRunSingle(self, depfile_name):
     output = StringIO()
     cmd_run = Run(backend='dbm',
                   dep_file=depfile_name,
                   task_list=tasks_sample(),
                   sel_tasks=["t3"])
     cmd_run._execute(output, single=True)
     got = output.getvalue().split("\n")[:-1]
     # t1 is a depenendency of t3 but not included
     assert [".  t3"] == got
コード例 #37
0
ファイル: test_cmd_list.py プロジェクト: JeffSpies/doit
 def testNoPrivate(self, depfile):
     task_list = list(tasks_sample())
     task_list.append(Task("_s3", [""]))
     output = StringIO()
     cmd_list = List(outstream=output, dep_file=depfile.name,
                     task_list=task_list)
     cmd_list._execute(pos_args=['_s3'])
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = []
     assert expected == got
コード例 #38
0
 def testProcessRunEmptyFilter(self, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(Run,
                          backend='dbm',
                          dep_file=depfile_name,
                          task_list=tasks_sample(),
                          sel_tasks=[])
     cmd_run._execute(output)
     got = output.getvalue().split("\n")[:-1]
     assert [] == got
コード例 #39
0
 def testProcessRun(self, dependency1, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(Run,
                          backend='dbm',
                          dep_file=depfile_name,
                          task_list=tasks_sample())
     result = cmd_run._execute(output)
     assert 0 == result
     got = output.getvalue().split("\n")[:-1]
     assert [".  t1", ".  t2", ".  g1.a", ".  g1.b", ".  t3"] == got
コード例 #40
0
ファイル: test_cmd_run.py プロジェクト: shanbady/doit
 def testProcessRunSingleSubtasks(self, depfile_name):
     output = StringIO()
     task_list = tasks_sample()
     assert task_list[4].name == "g1.b"
     task_list[4].task_dep = ["t3"]
     cmd_run = CmdFactory(Run, backend="dbm", dep_file=depfile_name, task_list=task_list, sel_tasks=["g1"])
     cmd_run._execute(output, single=True)
     got = output.getvalue().split("\n")[:-1]
     # t3 is a depenendency of g1.b but not included
     assert [".  g1.a", ".  g1.b"] == got
コード例 #41
0
ファイル: test_cmd_run.py プロジェクト: shanbady/doit
 def test_outfile(self, depfile_name):
     cmd_run = CmdFactory(Run, backend="dbm", dep_file=depfile_name, task_list=tasks_sample(), sel_tasks=["g1.a"])
     cmd_run._execute("test.out")
     try:
         outfile = open("test.out", "r")
         got = outfile.read()
         outfile.close()
         assert ".  g1.a\n" == got
     finally:
         if os.path.exists("test.out"):
             os.remove("test.out")
コード例 #42
0
ファイル: test_cmd_list.py プロジェクト: lelit/doit
 def testNoPrivate(self, depfile):
     task_list = list(tasks_sample())
     task_list.append(Task("_s3", [""]))
     output = StringIO()
     cmd_list = List(outstream=output,
                     dep_file=depfile.name,
                     task_list=task_list)
     cmd_list._execute(pos_args=['_s3'])
     got = [line.strip() for line in output.getvalue().split('\n') if line]
     expected = []
     assert expected == got
コード例 #43
0
    def testCustomReporter(self, depfile):
        output = StringIO.StringIO()

        class MyReporter(reporter.ConsoleReporter):
            def get_status(self, task):
                self.outstream.write('MyReporter.start %s\n' % task.name)

        cmd_run = Run(dep_file=depfile.name, task_list=[tasks_sample()[0]])
        cmd_run._execute(output, reporter=MyReporter)
        got = output.getvalue().split("\n")[:-1]
        assert 'MyReporter.start t1' == got[0]
コード例 #44
0
ファイル: test_cmd_run.py プロジェクト: shanbady/doit
 def testMP_not_available(self, dependency1, depfile_name, capsys, monkeypatch):
     # make sure MRunner wont be used
     monkeypatch.setattr(runner.MRunner, "available", Mock(return_value=False))
     output = StringIO()
     cmd_run = CmdFactory(Run, backend="dbm", dep_file=depfile_name, task_list=tasks_sample())
     result = cmd_run._execute(output, num_process=1)
     assert 0 == result
     got = output.getvalue().split("\n")[:-1]
     assert [".  t1", ".  t2", ".  g1.a", ".  g1.b", ".  t3"] == got
     err = capsys.readouterr()[1]
     assert "WARNING:" in err
     assert "parallel using threads" in err
コード例 #45
0
ファイル: test_cmd_run.py プロジェクト: shanbady/doit
 def testPluginReporter(self, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(
         Run,
         backend="dbm",
         dep_file=depfile_name,
         task_list=[tasks_sample()[0]],
         config={"REPORTER": {"my": "tests.test_cmd_run:MyReporter"}},
     )
     cmd_run._execute(output, reporter="my")
     got = output.getvalue().split("\n")[:-1]
     assert "MyReporter.start t1" == got[0]
コード例 #46
0
ファイル: test_cmd_run.py プロジェクト: swayf/doit
 def test_outfile(self, depfile):
     cmd_run = Run(dep_file=depfile.name, task_list=tasks_sample(),
                   sel_tasks=["g1.a"])
     cmd_run._execute('test.out')
     try:
         outfile = open('test.out', 'r')
         got = outfile.read()
         outfile.close()
         assert ".  g1.a\n" == got, repr(got)
     finally:
         if os.path.exists('test.out'):
             os.remove('test.out')
コード例 #47
0
ファイル: test_cmd_list.py プロジェクト: vvvvcp/doit
 def testDoc(self):
     output = StringIO()
     tasks = tasks_sample()
     cmd_list = CmdFactory(List, outstream=output, task_list=tasks)
     cmd_list._execute(quiet=False)
     got = [line for line in output.getvalue().split('\n') if line]
     expected = []
     for t in sorted(tasks):
         if not t.is_subtask:
             expected.append([t.name, t.doc])
     assert len(expected) == len(got)
     for exp1, got1 in zip(expected, got):
         assert exp1 == got1.split(None, 1)
コード例 #48
0
 def testPluginReporter(self, depfile_name):
     output = StringIO()
     cmd_run = CmdFactory(
         Run,
         backend='dbm',
         dep_file=depfile_name,
         task_list=[tasks_sample()[0]],
         config={'REPORTER': {
             'my': 'tests.test_cmd_run:MyReporter'
         }})
     cmd_run._execute(output, reporter='my')
     got = output.getvalue().split("\n")[:-1]
     assert 'MyReporter.start t1' == got[0]
コード例 #49
0
 def test_outfile(self, depfile):
     cmd_run = Run(dep_file=depfile.name,
                   task_list=tasks_sample(),
                   sel_tasks=["g1.a"])
     cmd_run._execute('test.out')
     try:
         outfile = open('test.out', 'r')
         got = outfile.read()
         outfile.close()
         assert ".  g1.a\n" == got, repr(got)
     finally:
         if os.path.exists('test.out'):
             os.remove('test.out')
コード例 #50
0
ファイル: test_cmd_run.py プロジェクト: lelit/doit
 def testProcessRunSingleSubtasks(self, depfile_name):
     output = StringIO()
     task_list = tasks_sample()
     assert task_list[4].name == 'g1.b'
     task_list[4].task_dep = ['t3']
     cmd_run = Run(backend='dbm',
                   dep_file=depfile_name,
                   task_list=task_list,
                   sel_tasks=["g1"])
     cmd_run._execute(output, single=True)
     got = output.getvalue().split("\n")[:-1]
     # t3 is a depenendency of g1.b but not included
     assert [".  g1.a", ".  g1.b"] == got
コード例 #51
0
ファイル: test_cmd_list.py プロジェクト: vvvvcp/doit
    def testStatus(self, dependency1, depfile):
        task_list = tasks_sample()
        depfile.ignore(task_list[0]) # t1
        depfile.save_success(task_list[1]) # t2
        depfile.close()

        output = StringIO()
        cmd_list = CmdFactory(List, outstream=output, dep_file=depfile.name,
                        backend='dbm', task_list=task_list)
        cmd_list._execute(status=True)
        got = [line.strip() for line in output.getvalue().split('\n') if line]
        assert 'R g1' in got
        assert 'I t1' in got
        assert 'U t2' in got
コード例 #52
0
 def test_outfile(self, depfile_name):
     cmd_run = CmdFactory(Run,
                          backend='dbm',
                          dep_file=depfile_name,
                          task_list=tasks_sample(),
                          sel_tasks=["g1.a"])
     cmd_run._execute('test.out')
     try:
         outfile = open('test.out', 'r')
         got = outfile.read()
         outfile.close()
         assert ".  g1.a\n" == got
     finally:
         if os.path.exists('test.out'):
             os.remove('test.out')
コード例 #53
0
ファイル: test_cmd_resetdep.py プロジェクト: rbeagrie/doit
 def test_invalid_task(self, depfile):
     output = StringIO()
     tasks = tasks_sample()
     cmd_reset = CmdFactory(ResetDep, outstream=output, task_list=tasks,
                            dep_manager=depfile)
     pytest.raises(InvalidCommand, cmd_reset._execute, pos_args=['xxx'])