Skip to content

Commit cfbf7a9

Browse files
committed
Fix coverage
1 parent 933512f commit cfbf7a9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ lint: ## Lint the code
3434
uv run ruff format --check
3535
uv run ruff check
3636

37-
PYRIGHT_PYTHON ?= 3.10
38-
37+
PYRIGHT_PYTHON ?= 3.13
3938
.PHONY: typecheck-pyright
4039
typecheck-pyright:
4140
@# PYRIGHT_PYTHON_IGNORE_WARNINGS avoids the overhead of making a request to github on every invocation
42-
PYRIGHT_PYTHON_IGNORE_WARNINGS=1 uv run pyright --pythonversion $(PYRIGHT_PYTHON)
41+
PYRIGHT_PYTHON_IGNORE_WARNINGS=1 UV_PROJECT_ENVIRONMENT=.venv$(subst .,,$(PYRIGHT_PYTHON)) uv run pyright --pythonversion $(PYRIGHT_PYTHON)
4342

4443
.PHONY: typecheck-mypy
4544
typecheck-mypy:
@@ -66,6 +65,13 @@ test-all-python: ## Run tests on Python 3.10 to 3.13
6665
@uv run coverage combine
6766
@uv run coverage report
6867

68+
PYTEST_PYTHON ?= 3.13
69+
.PHONY: test-specific-python
70+
test-specific-python: ## Run tests and collect coverage data using a specific python, specified by PYTEST_PYTHON env var
71+
UV_PROJECT_ENVIRONMENT=.venv$(subst .,,$(PYTEST_PYTHON)) uv run --python $(PYTEST_PYTHON) --all-extras --all-packages coverage run -p -m pytest -n auto --dist=loadgroup --durations=20
72+
@uv run coverage combine
73+
@uv run coverage report
74+
6975
.PHONY: testcov
7076
testcov: test ## Run tests and generate an HTML coverage report
7177
@echo "building coverage html"

tests/graph/beta/test_graph_iteration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ async def step_three(ctx: StepContext[IterState, None, int]) -> int: # pragma:
238238

239239
async with graph.iter(state=state) as run:
240240
event_count = 0
241-
async for _ in run:
241+
async for _ in run: # pragma: no branch
242242
event_count += 1
243243
if event_count >= 2:
244244
break # Early termination

0 commit comments

Comments
 (0)