Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(26)  |  Call(24)  |  Derive(0)  |  Import(2)

src/d/o/doit-0.25.0/tests/test_cmd_run.py   doit(Download)
from doit import reporter, runner
from doit.cmd_run import Run
from tests.conftest import tasks_sample
 
 
    def testProcessRun(self, dependency1, depfile_name):
        output = StringIO()
        cmd_run = Run(backend='dbm', dep_file=depfile_name,
                      task_list=tasks_sample())
        result = cmd_run._execute(output)
    def testProcessRunMP(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)
    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')
    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,

src/d/o/doit-0.25.0/tests/test_cmd_list.py   doit(Download)
from doit.task import Task
from doit.cmd_list import List
from tests.conftest import tasks_sample
 
 
class TestCmdList(object):
 
    def testQuiet(self, depfile):
        output = StringIO()
        tasks = tasks_sample()
    def testDoc(self, depfile):
        output = StringIO()
        tasks = tasks_sample()
        cmd_list = List(outstream=output, dep_file=depfile.name,
                        task_list=tasks)
    def testCustomTemplate(self, depfile):
        output = StringIO()
        tasks = tasks_sample()
        cmd_list = List(outstream=output, dep_file=depfile.name,
                        task_list=tasks)
    def testSubTask(self, depfile):
        output = StringIO()
        tasks = tasks_sample()
        cmd_list = List(outstream=output, dep_file=depfile.name,
                        task_list=tasks)