11import sqlalchemy as sa
2- import sqlalchemy .orm as so
3- from sqlalchemy .orm import Session
4- from pathlib import Path
52import pandas as pd
63import pytest
7- from orm_loader .loaders .data_classes import _clean_nulls
8- from orm_loader .tables .loadable_table import CSVLoadableTableInterface
9- from orm_loader .loaders .loader_interface import PandasLoader
104from orm_loader .loaders .loading_helpers import infer_encoding , infer_delim , check_line_ending , quick_load_pg
115
12- from tests .models import Base , SimpleTable , RequiredTable , CompositeTable
6+ from tests .models import SimpleTable
137
14- import numpy as np
158
169@pytest .mark .postgres
1710def test_copy_and_orm_path_equivalence (pg_session , tmp_path ):
@@ -24,7 +17,7 @@ def test_copy_and_orm_path_equivalence(pg_session, tmp_path):
2417 ]
2518 ).to_csv (csv , index = False , sep = "\t " )
2619
27- inserted = SimpleTable .load_csv (pg_session , csv )
20+ SimpleTable .load_csv (pg_session , csv )
2821 pg_session .commit ()
2922
3023 rows = pg_session .execute (sa .select (SimpleTable ).order_by (SimpleTable .id )).scalars ().all ()
@@ -298,7 +291,7 @@ def test_copy_fails_with_raw_carriage_returns_but_succeeds_after_normalisation(p
298291 try :
299292 quick_load_pg (path = csv , session = pg_session , tablename = "test_table" )
300293 pg_session .commit ()
301- except Exception as e :
294+ except Exception :
302295 failed = True
303296
304297 # Clean up table for second attempt
0 commit comments