Ejemplo n.º 1
0
 def test_command_feed_count(self):
     feed = delta.command_feed([u'/bin/echo', u'hello'], 0.1, 2)
     self.assertIs(next(feed), delta.separator)
     self.assertEqual(next(feed), u'hello\n')
     self.assertIs(next(feed), delta.separator)
     self.assertEqual(next(feed), u'hello\n')
     self.assertRaises(StopIteration, next, feed)
Ejemplo n.º 2
0
 def test_command_feed_shell(self):
     feed = delta.command_feed((u'echo hello',), 0.1)
     self.assertIs(next(feed), delta.separator)
     self.assertEqual(next(feed), u'hello\n')
     self.assertIs(next(feed), delta.separator)
     self.assertEqual(next(feed), u'hello\n')
     self.assertIs(next(feed), delta.separator)
     self.assertEqual(next(feed), u'hello\n')
Ejemplo n.º 3
0
 def test_command_feed(self):
     feed = delta.command_feed([u'/bin/echo', u'hello'], 0.1)
     self.assertIs(next(feed), delta.separator)
     self.assertEqual(next(feed), u'hello\n')
     self.assertIs(next(feed), delta.separator)
     self.assertEqual(next(feed), u'hello\n')
     self.assertIs(next(feed), delta.separator)
     self.assertEqual(next(feed), u'hello\n')