예제 #1
0
파일: task.py 프로젝트: FernandoG26/commons
 def _create_artifact_cache(self, spec, action):
   if len(spec) > 0:
     pants_workdir = self.context.config.getdefault('pants_workdir')
     my_name = self.__class__.__name__
     return create_artifact_cache(self.context.log, pants_workdir, spec, my_name, action)
   else:
     return None
예제 #2
0
 def _create_artifact_cache(self, spec, action):
     if len(spec) > 0:
         pants_workdir = self.context.config.getdefault('pants_workdir')
         my_name = self.__class__.__name__
         return create_artifact_cache(self.context.log, pants_workdir, spec,
                                      my_name, action)
     else:
         return None
예제 #3
0
 def check(expected_type, spec):
   cache = create_artifact_cache(MockLogger(), artifact_root, spec, 'TestTask', 'testing')
   self.assertTrue(isinstance(cache, expected_type))
   self.assertEquals(cache.artifact_root, artifact_root)