def test_isatty_false(self): w1 = StringIO() w1.isatty = lambda: True w2 = StringIO() w2.isatty = lambda: True writer = action.Writer(w1, w2) assert writer.isatty()
def test_isatty_overwrite_no(self): w1 = StringIO() w1.isatty = lambda: True w2 = StringIO() w2.isatty = lambda: True writer = action.Writer(w1) writer.add_writer(w2, False)
def test_write(self): w1 = StringIO() w2 = StringIO() writer = action.Writer(w1, w2) writer.flush() # make sure flush is supported writer.write("hello") assert "hello" == w1.getvalue() assert "hello" == w2.getvalue()