Production code shouldn't branch on `"pytest" in sys.modules` — it's fragile and couples db.py to test tooling. Instead, conftest.py now builds its own dedicated NullPool engine directly from settings, used only for the drop_all/create_all reset and the get_db override. The production engine in app/db.py is untouched and never exercised during tests, so this fully preserves the event-loop fix while keeping prod code test-agnostic.
452 B
452 B