Open adlmtl opened 1 year ago
Describe the bug finalizer() fails with
E asyncpg.exceptions.ObjectInUseError: database "test_db" is being accessed by other users E DETAIL: There is 1 other session using the database.
To Reproduce
@pytest.fixture(scope="session") def event_loop(): policy = asyncio.get_event_loop_policy() loop = policy.new_event_loop() yield loop loop.close() @pytest.fixture(scope="session", autouse=True) def initialize_tests(request, event_loop): initializer(models, db_url=test_db_url) request.addfinalizer(finalizer)
Expected behavior I expect the test db to be dropped as finalizer is calling connections.close_all() before trying to delete the db
Describe the bug finalizer() fails with
To Reproduce
Expected behavior I expect the test db to be dropped as finalizer is calling connections.close_all() before trying to delete the db