示例#1
0
文件: test_utils.py 项目: jol/ipkg
 def test_with_env(self):
     out = execute(['sh', '-c', 'echo $FOO'],
                   env={'FOO': '42'}, stdout=PIPE)[0]
     self.assertEqual(out, '42\n')
示例#2
0
文件: test_utils.py 项目: jol/ipkg
 def test_get_stdout_as_string(self):
     out = execute('echo 42', stdout=PIPE)[0]
     self.assertEqual(out, '42\n')
示例#3
0
文件: test_utils.py 项目: jol/ipkg
 def test_with_data(self):
     out = execute('cat', data='42', stdout=PIPE)[0]
     self.assertEqual(out, '42')
示例#4
0
文件: test_utils.py 项目: jol/ipkg
 def test(self):
     execute('echo -n')