Example #1
0
def parse_raw_log_stream(raw_log_stream):
    for raw_log_entry in util.split_file(raw_log_stream, '\0'):
        log_entry = _parse_log_entry(raw_log_entry)
        if log_entry is not None:
            yield log_entry
Example #2
0
def parse_raw_log_stream(raw_log_stream):
    for raw_log_entry in util.split_file(raw_log_stream, '\0'):
        log_entry = _parse_log_entry(raw_log_entry)
        if log_entry is not None:
            yield log_entry
Example #3
0
def test_split_file_barfs_on_empty_sep():
    stringio = StringIO("hi there")
    # call list to invoke the generator
    list(split_file(stringio, sep_char=""))
Example #4
0
def _check_split_file(data, sep, read_size):
    stringio = StringIO(data)
    eq_(data.split(sep), list(split_file(stringio, sep_char=sep, read_size=read_size)))
Example #5
0
def test_split_file_barfs_on_empty_sep():
    stringio = StringIO("hi there")
    # call list to invoke the generator
    list(split_file(stringio, sep_char=""))
Example #6
0
def _check_split_file(data, sep, read_size):
    stringio = StringIO(data)
    eq_(data.split(sep),
        list(split_file(stringio, sep_char=sep, read_size=read_size)))