Skip to content

Commit 41e7309

Browse files
committed
fix: Exclude aio module from coverage on Python 3.7
Add special coverage configuration for Python 3.7 that excludes the aio module since it requires Python 3.8+ due to Starlette dependency. This prevents coverage failures on Python 3.7.
1 parent 297cb96 commit 41e7309

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ extras =
3434
setenv =
3535
PYTESTARGS = --cov=functions_framework --cov-branch --cov-report term-missing --cov-fail-under=100
3636
windows-latest: PYTESTARGS =
37+
# Python 3.7: Exclude aio module from coverage since it requires Python 3.8+ (Starlette dependency)
38+
py37: PYTESTARGS = --cov=functions_framework --cov-branch --cov-report term-missing --cov-fail-under=100 --cov-omit='*/aio/*'
3739
commands = pytest {env:PYTESTARGS} {posargs}
3840

3941
[testenv:lint]
@@ -44,7 +46,8 @@ deps =
4446
isort
4547
mypy
4648
build
47-
extras = async
49+
extras =
50+
async
4851
commands =
4952
black --check src tests conftest.py --exclude tests/test_functions/background_load_error/main.py
5053
isort -c src tests conftest.py

0 commit comments

Comments
 (0)