Example #1
0
def test_from_txt(names_path):
    txt_stream = Stream.from_txt(names_path)
    validate_stream(txt_stream, 4, str)
Example #2
0
def test_from_empty_txt():
    # create a stream from an empty temp file and validate that its empty
    with tempfile.NamedTemporaryFile() as temp_file:
        txt_stream = Stream.from_txt(temp_file.name)
        validate_stream(txt_stream, 0, object)