Move Redis test container helpers into integration conftest #35

Merged
brian merged 1 commits from cursor/move-redis-container-to-conftest into main 2026-07-08 21:23:49 +02:00
Owner

Summary

Moves the Redis testcontainer helper classes into tests/integration/conftest.py and removes the misleading redis_container_test.py module.

  • Inlines _RedisPingWaitStrategy, RedisTestContainer, and REDIS_PORT next to the redis_container fixture that uses them
  • Removes the collect_ignore workaround that was only needed because the helper lived in a *_test.py file with no tests

Test plan

  • uv run pytest tests/integration/ --collect-only -q
  • Pre-commit hooks passed on commit (ruff, mypy, pyupgrade)
## Summary Moves the Redis testcontainer helper classes into `tests/integration/conftest.py` and removes the misleading `redis_container_test.py` module. - Inlines `_RedisPingWaitStrategy`, `RedisTestContainer`, and `REDIS_PORT` next to the `redis_container` fixture that uses them - Removes the `collect_ignore` workaround that was only needed because the helper lived in a `*_test.py` file with no tests ## Test plan - [x] `uv run pytest tests/integration/ --collect-only -q` - [x] Pre-commit hooks passed on commit (`ruff`, `mypy`, `pyupgrade`)
brian added 1 commit 2026-07-08 21:19:17 +02:00
Move Redis test container helpers into integration conftest.
PR Title Check / check-title (pull_request) Successful in 5s
Test Python Package / unit-tests (pull_request) Successful in 14s
Code Quality Pipeline / code-quality (pull_request) Successful in 31s
Test Python Package / integration-tests (pull_request) Successful in 1m9s
Test Python Package / coverage-report (pull_request) Successful in 29s
eafc717045
Colocate RedisTestContainer with the fixtures that use it and remove the misleading redis_container_test module plus collect_ignore workaround.

Co-authored-by: Cursor <cursoragent@cursor.com>
Member

Test Coverage Report:

Name                                                            Stmts   Miss    Cover   Missing
-----------------------------------------------------------------------------------------------
python_repositories/__init__.py                                    12      0  100.00%
python_repositories/adapters/__init__.py                           13      0  100.00%
python_repositories/adapters/connection_aware_adapter.py           45      0  100.00%
python_repositories/adapters/minio_adapter.py                     121      0  100.00%
python_repositories/adapters/redis_adapter.py                     111      0  100.00%
python_repositories/config/__init__.py                              4      0  100.00%
python_repositories/config/dotenv_loader.py                         7      0  100.00%
python_repositories/config/minio_config.py                         31      0  100.00%
python_repositories/config/redis_config.py                         14      0  100.00%
python_repositories/examples/__init__.py                            0      0  100.00%
python_repositories/examples/artifact_object_repository.py          9      0  100.00%
python_repositories/examples/user_json_repository.py               10      0  100.00%
python_repositories/interfaces/__init__.py                          5      0  100.00%
python_repositories/interfaces/connection_aware_interface.py        8      0  100.00%
python_repositories/interfaces/context_aware_interface.py           8      0  100.00%
python_repositories/interfaces/json_repository_interface.py        14      0  100.00%
python_repositories/interfaces/object_repository_interface.py      11      0  100.00%
-----------------------------------------------------------------------------------------------
TOTAL                                                             423      0  100.00%

**Test Coverage Report:** ``` Name Stmts Miss Cover Missing ----------------------------------------------------------------------------------------------- python_repositories/__init__.py 12 0 100.00% python_repositories/adapters/__init__.py 13 0 100.00% python_repositories/adapters/connection_aware_adapter.py 45 0 100.00% python_repositories/adapters/minio_adapter.py 121 0 100.00% python_repositories/adapters/redis_adapter.py 111 0 100.00% python_repositories/config/__init__.py 4 0 100.00% python_repositories/config/dotenv_loader.py 7 0 100.00% python_repositories/config/minio_config.py 31 0 100.00% python_repositories/config/redis_config.py 14 0 100.00% python_repositories/examples/__init__.py 0 0 100.00% python_repositories/examples/artifact_object_repository.py 9 0 100.00% python_repositories/examples/user_json_repository.py 10 0 100.00% python_repositories/interfaces/__init__.py 5 0 100.00% python_repositories/interfaces/connection_aware_interface.py 8 0 100.00% python_repositories/interfaces/context_aware_interface.py 8 0 100.00% python_repositories/interfaces/json_repository_interface.py 14 0 100.00% python_repositories/interfaces/object_repository_interface.py 11 0 100.00% ----------------------------------------------------------------------------------------------- TOTAL 423 0 100.00% ```
brian merged commit 1431f455c1 into main 2026-07-08 21:23:49 +02:00
brian deleted branch cursor/move-redis-container-to-conftest 2026-07-08 21:23:50 +02:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lille-vemmelund/python-repositories#35