コード例 #1
0
 def test_execute_direct(self):
     out,err = util.execute('echo test')
     assert out=='test\n' and err==''
コード例 #2
0
 def test_execute_runtime_error(self):
     with pytest.raises(RuntimeError):
         util.execute('false')
コード例 #3
0
 def test_execute_env(self):
     out,err = util.execute('sh -c "echo $test_for_execute"',env={'test_for_execute':'test'})
     assert out=='test\n' and err==''
コード例 #4
0
ファイル: test_util.py プロジェクト: eisenforschung/DAMASK
 def test_execute_invalid(self):
     with pytest.raises(RuntimeError):
         util.execute('/bin/false')