def test_load_count(): stream = io.StringIO() a = TextStream(stream) a.write_body(3) stream.seek(0) assert a.load_body() == 3