Exemple #1
0
 def test_isatty(self):
     """Make sure isatty() is always false."""
     s = utils.FakeIOStream(self._write_func)
     assert not s.isatty()
Exemple #2
0
 def test_write(self):
     """Make sure writing works."""
     s = utils.FakeIOStream(self._write_func)
     assert s.write('echo') == 'echo'
Exemple #3
0
 def test_flush(self):
     """Smoke-test to see if flushing works."""
     s = utils.FakeIOStream(self._write_func)
     s.flush()