f31ddd2822be9b6c5b8ae26bfe1975bb33393b4e
Task 3's conftest.py (per plan) reuses the module-level app.db.engine singleton across every test. pytest-asyncio 0.24 gives each test function its own event loop by default, and asyncpg connections are bound to the loop they were opened on. Pooling a connection from a prior test's loop made subsequent tests fail with "got Future attached to a different loop" as soon as more than one DB-touching test ran in the same session. NullPool is applied only when running under pytest (detected via sys.modules), so production keeps normal connection pooling and only the test suite pays the cost of a fresh connection per checkout.
Description
talking to spirits
Languages
TypeScript
46.3%
Python
32.6%
CSS
13%
C
7.3%
JavaScript
0.3%
Other
0.4%