def test_load_count(): stream = io.StringIO() a = TextStream(stream) a.write_count(3) stream.seek(0) assert a.load_count() == 3
def test_write_count(): stream = io.StringIO() a = TextStream(stream) a.write_count(3) stream.seek(0) assert stream.readline() == "3\n"