def setUp(self): env.reset() if not os.path.isdir('temp'): os.mkdir('temp') with open('temp/script1.sos', 'w') as script: script.write(''' [0] seq = range(3) input: for_each='seq' output: "test${_seq}.txt" print(output) ''') with open('temp/script2.sos', 'w') as script: # with tab after run: script.write(''' [0] seq = range(3) input: for_each='seq' output: "test${_seq}.txt" run: concurrent=True echo 'this is test script' [10] report('this is action report') ''') self.scripts = ['temp/script1.sos', 'temp/script2.sos']
def setUp(self): env.reset() subprocess.call('sos remove -s', shell=True) #self.resetDir('~/.sos') self.temp_files = [] self.resetDir('temp') Host.reset()
def setUp(self): env.reset() #self.resetDir('~/.sos') self.temp_files = [] Host.reset() # remove .status file left by failed workflows. subprocess.call('sos purge', shell=True)
def setUp(self): env.reset() self.olddir = os.getcwd() file_dir = os.path.split(__file__)[0] if file_dir: os.chdir(file_dir) if not os.path.isdir('temp'): os.mkdir('temp') with open('temp/script1.sos', 'w') as script: script.write(''' [0] seq = range(3) input: for_each='seq' output: 'test${_seq}.txt' print(output) ''') with open('temp/script2.sos', 'w') as script: # with tab after run: script.write(''' #! This is supposed to be a markdown #! cell [0] seq = range(3) input: for_each='seq' output: 'test${_seq}.txt' run: concurrent=True echo 'this is test script' [10] report('this is action report') ''') self.scripts = ['temp/script1.sos', 'temp/script2.sos']
def testWorkflowDict(self): """Test workflow dict with attribute access""" env.reset() d = WorkflowDict() d["a"] = 1 self.assertEqual(d["a"], 1) # d["a"] += 1 self.assertEqual(d["a"], 2)
def testWorkflowDict(self): '''Test workflow dict with attribute access''' env.reset() d = WorkflowDict() d['a'] = 1 self.assertEqual(d['a'], 1) # d['a'] += 1 self.assertEqual(d['a'], 2)
def setUp(self): self.olddir = os.getcwd() try: # this only works with nose, but is also # only needed by nose os.chdir(os.path.dirname(__file__)) except Exception: pass env.reset() self.temp_files = []
def setUp(self): self.olddir = os.getcwd() try: # this only works with nose, but is also # only needed by nose os.chdir(os.path.dirname(__file__)) except: pass env.reset() self.temp_files = []
def setUp(self): env.reset() self.temp_files = []
def setUp(self): env.reset()
def setUp(self): env.reset() subprocess.call('sos remove -s', shell=True) self.temp_files = []
def setUp(self): env.reset() self.temp_files = [] subprocess.call('redis-server &', shell=True) subprocess.call('rq worker &', shell=True)
def setUp(self): env.reset() subprocess.call("sos remove -s", shell=True) # self.resetDir('~/.sos') self.temp_files = []