Example #1
0
 def test_stderrNoErrput(self):
     """
     recordStderr ignores empty errput sent to it
     """
     btr = BaseTestResult(None, None)
     pt = ProtoTest()
     btr.recordStderr(pt, '')
     self.assertEqual(btr.stderr_errput, {})
Example #2
0
 def test_stdoutNoOutput(self):
     """
     recordStdout ignores empty output sent to it
     """
     btr = BaseTestResult(None, None)
     pt = ProtoTest()
     btr.recordStdout(pt, '')
     self.assertEqual(btr.stdout_output, {})
Example #3
0
 def test_stderrErrput(self):
     """
     recordStderr records errput.
     """
     btr = BaseTestResult(None, None)
     pt = ProtoTest()
     o = "some errput"
     btr.recordStderr(pt, o)
     self.assertEqual(btr.stderr_errput[pt], o)
Example #4
0
 def test_stdoutOutput(self):
     """
     recordStdout records output.
     """
     btr = BaseTestResult(None, None)
     pt = ProtoTest()
     o = "some output"
     btr.recordStdout(pt, o)
     self.assertEqual(btr.stdout_output[pt], o)
Example #5
0
 def test_displayStderr(self):
     """
     displayStderr displays captured stderr
     """
     stream = StringIO()
     noise = "blah blah blah"
     btr = BaseTestResult(stream, Colors(False))
     pt = ProtoTest()
     btr.stderr_errput[pt] = noise
     btr.displayStderr(pt)
     self.assertIn(noise, stream.getvalue())