llama-hub/tests/test_string_iterable.py
Jesse Zhang 3c497ac430
Better tests, including download_loader (#36)
* Better tests including download_loader

* Fix file name

* Import loaders locally

* Fix relative imports

* Update sys path

* Update sys path

* Import path

* Import path
2023-02-15 17:18:21 -08:00

15 lines
466 B
Python

"""Check that the string iterable loader is working as expected."""
from pathlib import Path
import sys
sys.path.append(Path(__file__).parent.parent)
from loader_hub.string_iterable.base import StringIterableReader
def test_string_iterable() -> None:
"""Check that StringIterableReader works correctly."""
reader = StringIterableReader()
documents = reader.load_data(texts=["I went to the store", "I bought an apple"])
assert len(documents) == 2