Skip to content

Commit

Permalink
Fixed expected sqlite repr() output on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Aug 2, 2024
1 parent d9bf4b5 commit 25cac59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_datastores.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,12 @@ async def test_memory(self, memory_store: MemoryDataStore) -> None:
async def test_sqlite(self, tmp_path: Path) -> None:
from sqlalchemy import create_engine

expected_path = str(tmp_path).replace("\\", "\\\\")
engine = create_engine(f"sqlite:///{tmp_path}")
data_store = SQLAlchemyDataStore(engine)
assert repr(data_store) == (f"SQLAlchemyDataStore(url='sqlite:///{tmp_path}')")
assert repr(data_store) == (
f"SQLAlchemyDataStore(url='sqlite:///{expected_path}')"
)

async def test_psycopg(self) -> None:
from sqlalchemy.ext.asyncio import create_async_engine
Expand Down

0 comments on commit 25cac59

Please sign in to comment.