Example #1
0
 def test_process_kill(self):
     with self.assert_max_execution_time(100):
         proc = helpers.RootHelperProcess(['tee'])
         proc.kill()
         proc.wait()
         # sudo returns 137 and
         # rootwrap returns 247 (bug 1364822)
         self.assertIn(proc.returncode, [137, 247])
Example #2
0
 def test_process_read_write(self):
     proc = helpers.RootHelperProcess(['tee'])
     proc.writeline('foo')
     output = proc.read_stdout(helpers.READ_TIMEOUT)
     self.assertEqual('foo\n', output)