File size: 439 Bytes
25fc3a2
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)