예제 #1
0
파일: test_convert.py 프로젝트: BoPeng/SOS
    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']
예제 #2
0
 def setUp(self):
     env.reset()
     subprocess.call('sos remove -s', shell=True)
     #self.resetDir('~/.sos')
     self.temp_files = []
     self.resetDir('temp')
     Host.reset()
예제 #3
0
 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)
예제 #4
0
    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()
        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']
예제 #6
0
파일: test_utils.py 프로젝트: BoPeng/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)
예제 #7
0
 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)
예제 #8
0
 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 = []
예제 #9
0
파일: test_actions.py 프로젝트: BoPeng/SOS
 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 = []
예제 #10
0
 def setUp(self):
     env.reset()
     self.temp_files = []
예제 #11
0
 def setUp(self):
     env.reset()
예제 #12
0
 def setUp(self):
     env.reset()
     subprocess.call('sos remove -s', shell=True)
     self.temp_files = []
예제 #13
0
파일: test_utils.py 프로젝트: BoPeng/SOS
 def setUp(self):
     env.reset()
예제 #14
0
파일: test_actions.py 프로젝트: BoPeng/SOS
 def setUp(self):
     env.reset()
     self.temp_files = []
예제 #15
0
파일: test_queue.py 프로젝트: mr-c/SOS
 def setUp(self):
     env.reset()
     self.temp_files = []
     subprocess.call('redis-server &', shell=True)
     subprocess.call('rq worker &', shell=True)
예제 #16
0
파일: test_queue.py 프로젝트: BoPeng/SOS
 def setUp(self):
     env.reset()
     self.temp_files = []
     subprocess.call('redis-server &', shell=True)
     subprocess.call('rq worker &', shell=True)
예제 #17
0
 def setUp(self):
     env.reset()
     subprocess.call("sos remove -s", shell=True)
     # self.resetDir('~/.sos')
     self.temp_files = []