Пример #1
0
def test_load_header():
    stream = io.StringIO()
    a = TextStream(stream)
    a.write_header("hoge")
    stream.seek(0)
    assert a.load_header() == "hoge"
Пример #2
0
def test_write_header():
    stream = io.StringIO()
    a = TextStream(stream)
    a.write_header("hoge")
    stream.seek(0)
    assert stream.readline() == "hoge\n"