Exemple #1
0
 def setUp(self):
     """Runs anew before each test to create farm fresh temp dirs."""
     from builtins import str as normal_str
     self.outDir = os.path.join('/tmp/', 'toil-cwl-test-' + normal_str(uuid.uuid4()))
     os.makedirs(self.outDir)
     self.rootDir = self._projectRootPath()
     self.cwlSpec = os.path.join(self.rootDir, 'src/toil/test/cwl/spec')
     self.workDir = os.path.join(self.cwlSpec, 'v1.0')
     # The latest cwl git hash. Update it to get the latest tests.
     testhash = "22490926651174c6cbe01c76c2ded3c9e8d0ee6f"
     url = "https://github.com/common-workflow-language/common-workflow-language/archive/%s.zip" % testhash
     if not os.path.exists(self.cwlSpec):
         urlretrieve(url, "spec.zip")
         with zipfile.ZipFile('spec.zip', "r") as z:
             z.extractall()
         shutil.move("common-workflow-language-%s" % testhash, self.cwlSpec)
         os.remove("spec.zip")
Exemple #2
0
 def setUp(self):
     """Runs anew before each test to create farm fresh temp dirs."""
     from builtins import str as normal_str
     self.outDir = os.path.join('/tmp/', 'toil-cwl-test-' + normal_str(uuid.uuid4()))
     os.makedirs(self.outDir)
     self.rootDir = self._projectRootPath()
     self.cwlSpec = os.path.join(self.rootDir, 'src/toil/test/cwl/spec')
     self.workDir = os.path.join(self.cwlSpec, 'v1.0')
     # The latest cwl git commit hash from https://github.com/common-workflow-language/common-workflow-language.
     # Update it to get the latest tests.
     testhash = 'a062055fddcc7d7d9dbc53d28288e3ccb9a800d8'
     url = 'https://github.com/common-workflow-language/common-workflow-language/archive/%s.zip' % testhash
     if not os.path.exists(self.cwlSpec):
         urlretrieve(url, 'spec.zip')
         with zipfile.ZipFile('spec.zip', 'r') as z:
             z.extractall()
         shutil.move('common-workflow-language-%s' % testhash, self.cwlSpec)
         os.remove('spec.zip')