def METHOD_NAME(
    self,
    rotating_logger,
    binary,
    rotation_strategy,
    prepare_logfiles,
    stream_class,
):
    empty_line = stream_class._empty_string()
    log_content = prepare_logfiles(
        rotating_logger, binary, rotation_strategy.wait
    )
    stream = stream_class(
        rotating_logger.pattern, rotation_strategy.strategy
    )
    with closing(stream):
        assert stream.readline() == log_content[0]
        end = stream.flush()
        assert stream.readline() == empty_line
        assert stream.position == end
        line = "one more line"
        rotating_logger.info(line)
        if binary:
            expected = (line + os.linesep).encode()
        else:
            expected = line + "\n"
        assert stream.readline() == expected