예제 #1
0
 def test_send(self):
     from supervisor.childutils import pcomm
     stdout = StringIO()
     pcomm.send('hello', stdout)
     from supervisor.events import ProcessCommunicationEvent
     begin = ProcessCommunicationEvent.BEGIN_TOKEN
     end = ProcessCommunicationEvent.END_TOKEN
     self.assertEqual(stdout.getvalue(), '%s%s%s' % (begin, 'hello', end))
예제 #2
0
 def test_send(self):
     from supervisor.childutils import pcomm
     stdout = StringIO()
     pcomm.send('hello', stdout)
     from supervisor.events import ProcessCommunicationEvent
     begin = ProcessCommunicationEvent.BEGIN_TOKEN
     end = ProcessCommunicationEvent.END_TOKEN
     self.assertEqual(stdout.getvalue(), '%s%s%s' % (begin, 'hello', end))
예제 #3
0
 def test_send(self):
     from supervisor.childutils import pcomm
     stdout = BytesIO()
     pcomm.send(b'hello', stdout)
     from supervisor.events import ProcessCommunicationEvent
     begin = ProcessCommunicationEvent.BEGIN_TOKEN
     end = ProcessCommunicationEvent.END_TOKEN
     self.assertEqual(stdout.getvalue(), begin + b'hello' + end)
예제 #4
0
 def test_send(self):
     from supervisor.childutils import pcomm
     stdout = BytesIO()
     pcomm.send(b'hello', stdout)
     from supervisor.events import ProcessCommunicationEvent
     begin = ProcessCommunicationEvent.BEGIN_TOKEN
     end = ProcessCommunicationEvent.END_TOKEN
     self.assertEqual(stdout.getvalue(), begin + b'hello' + end)