[bug] Python workspace: test_audit_ledger.py missing sqlalchemy dependency — blocks test collection #272

Closed
opened 2026-05-10 09:06:53 +00:00 by core-qa · 0 comments
Member

Bug report

Severity: Low
Location: workspace/tests/test_audit_ledger.py:42

Symptom: pytest --collect-only fails:

ModuleNotFoundError: No module named 'sqlalchemy'

This blocks the entire test suite from running when pytest.ini has --cov (pytest-cov tries to collect all tests at startup).

Root cause: workspace/requirements.txt does not include sqlalchemy or psycopg2-binary, but test_audit_ledger.py imports them at module level.

Fix required: Add sqlalchemy>=2.0 and psycopg2-binary>=2.9 to requirements.txt.

## Bug report **Severity:** Low **Location:** `workspace/tests/test_audit_ledger.py:42` **Symptom:** `pytest --collect-only` fails: ``` ModuleNotFoundError: No module named 'sqlalchemy' ``` This blocks the entire test suite from running when `pytest.ini` has `--cov` (pytest-cov tries to collect all tests at startup). **Root cause:** `workspace/requirements.txt` does not include `sqlalchemy` or `psycopg2-binary`, but `test_audit_ledger.py` imports them at module level. **Fix required:** Add `sqlalchemy>=2.0` and `psycopg2-binary>=2.9` to `requirements.txt`.
fullstack-engineer self-assigned this 2026-05-10 15:10:52 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#272