Exemplo n.º 1
0
 def test_docs(self, module):
     tasks = _pynt._get_tasks(module)
     assert 4 == len(tasks)
     
     for task_ in tasks:
         assert task_.name in self.docs
         assert self.docs[task_.name] == task_.doc
Exemplo n.º 2
0
    def test_docs(self, module):
        tasks = _pynt._get_tasks(module)
        assert 4 == len(tasks)

        for task_ in tasks:
            assert task_.name in self.docs
            assert self.docs[task_.name] == task_.doc
Exemplo n.º 3
0
 def test_get_tasks(self):
     from .build_scripts import dependencies
     tasks = _pynt._get_tasks(dependencies)
     assert len(tasks) == 5
     assert 3 == len([task for task in tasks
                      if task.name == 'android'][0].dependencies)
     assert 3 == len([task for task in tasks
                      if task.name == 'ios'][0].dependencies)
Exemplo n.º 4
0
 def test_dependencies_for_imported(self):
     from .build_scripts import default_task_and_import_dependencies
     tasks = _pynt._get_tasks(default_task_and_import_dependencies)
     assert 7 == len(tasks)
     assert [task for task in tasks if task.name == 'clean']
     assert [task for task in tasks if task.name == 'local_task']
     assert [task for task in tasks if task.name == 'android']
     assert 3 == len([task for task in tasks
                      if task.name == 'task_with_imported_dependencies'][0].dependencies)
Exemplo n.º 5
0
 def test_dependencies_for_imported(self):
     from .build_scripts import default_task_and_import_dependencies
     tasks = _pynt._get_tasks(default_task_and_import_dependencies)
     assert 7 == len(tasks)
     assert [task for task in tasks if task.name == 'clean']
     assert [task for task in tasks if task.name == 'local_task']
     assert [task for task in tasks if task.name == 'android']
     assert 3 == len([task for task in tasks
                      if task.name == 'task_with_imported_dependencies'][0].dependencies)
Exemplo n.º 6
0
 def test_list_docs(self, module, args):
     with mock_stdout() as out: 
         build(module,args)
     stdout = out[0]
     tasks = _pynt._get_tasks(module)
     for task in tasks:
         if task.ignored:
             assert re.findall('%s\s+%s\s+%s' % (task.name,"\[Ignored\]", task.doc), stdout)
         else:
             assert re.findall('%s\s+%s' % (task.name, task.doc), stdout)
Exemplo n.º 7
0
 def test_list_docs(self, module, args):
     with mock_stdout() as out: 
         build(module,args)
     stdout = out[0]
     tasks = _pynt._get_tasks(module)
     for task in tasks:
         if task.ignored:
             assert re.findall('%s\s+%s\s+%s' % (task.name,"\[Ignored\]", task.doc), stdout)
         else:
             assert re.findall('%s\s+%s' % (task.name, task.doc), stdout)
Exemplo n.º 8
0
 def test_get_tasks(self):
     from .build_scripts import dependencies
     tasks = _pynt._get_tasks(dependencies)
     assert len(tasks) == 5
     assert 3 == len([task for task in tasks if task.name == 'android'][0].dependencies)
     assert 3 == len([task for task in tasks if task.name == 'ios'][0].dependencies)
Exemplo n.º 9
0
 def test_get_tasks(self):
     from .build_scripts import simple
     ts = _pynt._get_tasks(simple)
     assert len(ts) == 5
Exemplo n.º 10
0
 def test_get_tasks(self):
     import build_scripts.dependancies
     ts = _pynt._get_tasks(build_scripts.dependancies)
     print ts
     assert len(ts) == 5
Exemplo n.º 11
0
 def test_get_tasks(self):
     import build_scripts.simple
     ts = _pynt._get_tasks(build_scripts.simple)
     print ts
     assert len(ts) == 5
Exemplo n.º 12
0
 def test_get_tasks(self):
     from .build_scripts import simple
     ts = _pynt._get_tasks(simple)
     assert len(ts) == 5