def METHOD_NAME(s):
    unlink(file_name)
    f = pyio.open(file_name, "wb")
    try:
        # write once with \n and once without
        f.write(s)
        f.write(b"\n")
        f.write(s)
        f.close()
        f = pyio.open(file_name, "rb")
        line = f.readline()
        assert line == s + b"\n"
        line = f.readline()
        assert line == s
        line = f.readline()
        assert not line  # Must be at EOF
        f.close()
    finally:
        unlink(file_name)