Spaces:
Build error
Build error
import pandas as pd | |
from csv_loader import CSVLoader | |
def test_csv_loader(): | |
csv_loader = CSVLoader() | |
# Test loading a CSV file | |
df = csv_loader.load("test.csv") | |
assert isinstance(df, pd.DataFrame) | |
# Test converting to required structure | |
structured_df = csv_loader.convert_to_required_structure(df) | |
assert isinstance(structured_df, pd.DataFrame) | |
assert "\n" in structured_df.to_string(index=False) | |