Пример #1
0
 def testPipeNoLines(self):
     process = MockProcess(rc=0, lines=[])
     self.assertEqual(process.pipe(''), '')
Пример #2
0
 def testPipeFailure(self):
     process = MockProcess(rc=1, lines=['these', 'are', '4', 'lines'])
     self.assertEqual(process.pipe(''), '')
Пример #3
0
 def testPipeSuccess(self):
     process = MockProcess(rc=0, lines=['these', 'are', '4', 'lines'])
     self.assertEqual(process.pipe(''), 'these')
Пример #4
0
 def testPipeNoLines(self):
     process = MockProcess(rc=0, lines=[])
     self.assertEqual(process.pipe(''), '')
Пример #5
0
 def testPipeFailure(self):
     process = MockProcess(rc=1, lines=['these', 'are', '4', 'lines'])
     self.assertEqual(process.pipe(''), '')
Пример #6
0
 def testPipeSuccess(self):
     process = MockProcess(rc=0, lines=['these', 'are', '4', 'lines'])
     self.assertEqual(process.pipe(''), 'these')