Skip to content

Commit

Permalink
fix database file removal
Browse files Browse the repository at this point in the history
  • Loading branch information
hugobessa committed Dec 11, 2024
1 parent 0d28437 commit 6017dd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,8 @@ def async_db_session(async_db_engine) -> async_sessionmaker[AsyncSession]:
def cleanup(request):
"""Cleanup a testing directory once we are finished."""
def remove_test_db():
os.remove("test.db")
try:
os.remove("test.db")
except FileNotFoundError:
pass
request.addfinalizer(remove_test_db)

0 comments on commit 6017dd3

Please sign in to comment.