mirror of
https://github.com/run-llama/llama-hub.git
synced 2025-08-03 06:12:26 +00:00

* Better tests including download_loader * Fix file name * Import loaders locally * Fix relative imports * Update sys path * Update sys path * Import path * Import path
15 lines
466 B
Python
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
|