Skip to content

Commit 36ff0fa

Browse files
chrisguidryclaude
andcommitted
Restore 100% test coverage for tests/conftest.py and enforce in CI
Add pragma: no cover to Valkey-specific code paths that are not executed in the default test environment. Also add --cov-fail-under=100 to CI to ensure coverage regressions are caught automatically. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 271c1fe commit 36ff0fa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Run tests
3535
env:
3636
REDIS_VERSION: ${{ matrix.redis-version }}
37-
run: uv run pytest --cov-branch --cov-report=xml --cov-report=term-missing:skip-covered
37+
run: uv run pytest --cov-branch --cov-fail-under=100 --cov-report=xml --cov-report=term-missing:skip-covered
3838

3939
- name: Upload coverage reports to Codecov
4040
uses: codecov/codecov-action@v5

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ def redis_server(testrun_uid: str, worker_id: str) -> Generator[Container, None,
9191
redis_port = s.getsockname()[1]
9292

9393
# Determine Docker image based on version
94-
if REDIS_VERSION.startswith("valkey-"):
95-
version = REDIS_VERSION.replace("valkey-", "")
96-
image = f"valkey/valkey:{version}"
94+
if REDIS_VERSION.startswith("valkey-"): # pragma: no cover
95+
version = REDIS_VERSION.replace("valkey-", "") # pragma: no cover
96+
image = f"valkey/valkey:{version}" # pragma: no cover
9797
else:
9898
image = f"redis:{REDIS_VERSION}"
9999

0 commit comments

Comments
 (0)