fix(deps): add pytest-postgresql for db schema migration tests#21280
fix(deps): add pytest-postgresql for db schema migration tests#21280
Conversation
The test_db_schema_migration.py test requires pytest-postgresql but it was missing from dependencies, causing import errors: ModuleNotFoundError: No module named 'pytest_postgresql' Added pytest-postgresql ^6.0.0 to dev dependencies to fix test collection errors in proxy_unit_tests. This is a pre-existing issue, not related to PR #21277. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryAdds the missing
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| pyproject.toml | Adds pytest-postgresql = "^6.0.0" to dev dependencies. Correctly placed alongside other pytest plugins. Straightforward and correct. |
| poetry.lock | Lock file regenerated with new transitive dependencies (mirakuru, port-for, psutil, psycopg, setuptools) for pytest-postgresql. Poetry version changed from 2.2.0 to 2.1.4 in the header comment, which could cause lock file churn. |
Flowchart
flowchart TD
A[pyproject.toml] -->|adds| B[pytest-postgresql ^6.0.0]
B -->|depends on| C[mirakuru]
B -->|depends on| D[port-for >=0.7.3]
B -->|depends on| E[psycopg >=3.0.0]
B -->|depends on| F[setuptools]
B -->|depends on| G[pytest >=6.2]
C -->|depends on| H[psutil]
E -->|depends on| I[tzdata - Windows only]
B -->|used by| J[test_db_schema_migration.py]
J -->|imports| K["from pytest_postgresql import factories"]
Last reviewed commit: 32adfa2
poetry.lock
Outdated
| @@ -1,4 +1,4 @@ | |||
| # This file is automatically @generated by Poetry 2.2.0 and should not be changed by hand. | |||
| # This file is automatically @generated by Poetry 2.1.4 and should not be changed by hand. | |||
There was a problem hiding this comment.
Poetry version downgrade in lock file
The lock file was regenerated with Poetry 2.1.4, but the previous lock file was generated with Poetry 2.2.0. This version mismatch could cause unnecessary lock file churn if other contributors use Poetry 2.2.0. Consider regenerating the lock file with the same Poetry version used by the rest of the team to keep things consistent.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Updated lock file to use Poetry 2.3.2 (matching main branch standard). This addresses Greptile feedback about Poetry version mismatch. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Resolved poetry.lock conflict by regenerating with Poetry 2.3.2. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Summary
Fixes import error in
tests/proxy_unit_tests/test_db_schema_migration.py.Problem
The test file requires
pytest-postgresqlbut it's not in the project dependencies:This causes test collection to fail in the
proxy-unittest groups.Root Cause
The dependency was never added when
test_db_schema_migration.pywas created. This is a pre-existing issue, not caused by any recent changes.Solution
Added
pytest-postgresql = "^6.0.0"to[tool.poetry.group.dev.dependencies]in pyproject.toml.Testing
After this fix, the test file can be collected without errors:
Related
This error was exposed during CI testing but is not related to:
Simply a missing dependency that needs to be added.
🤖 Generated with Claude Code