Skip to content

Commit d96e111

Browse files
authored
Add pytest-cov and .coveragerc (vllm-project#24778)
Signed-off-by: Reza Barazesh <[email protected]>
1 parent 2891603 commit d96e111

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

.coveragerc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[run]
2+
source = vllm
3+
omit =
4+
*/tests/*
5+
*/test_*
6+
*/__pycache__/*
7+
*/build/*
8+
*/dist/*
9+
*/vllm.egg-info/*
10+
*/third_party/*
11+
*/examples/*
12+
*/benchmarks/*
13+
*/docs/*
14+
15+
[report]
16+
exclude_lines =
17+
pragma: no cover
18+
def __repr__
19+
if self.debug:
20+
if settings.DEBUG
21+
raise AssertionError
22+
raise NotImplementedError
23+
if 0:
24+
if __name__ == .__main__.:
25+
class .*\bProtocol\):
26+
@(abc\.)?abstractmethod
27+
28+
[html]
29+
directory = htmlcov
30+
31+
[xml]
32+
output = coverage.xml

requirements/test.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pytest-asyncio
66
pytest-rerunfailures
77
pytest-shard
88
pytest-timeout
9+
pytest-cov
910

1011
# testing utils
1112
backoff # required for phi4mm test

requirements/test.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ colorful==0.5.6
135135
# via ray
136136
contourpy==1.3.0
137137
# via matplotlib
138+
coverage==7.10.6
139+
# via pytest-cov
138140
cramjam==2.9.0
139141
# via fastparquet
140142
cupy-cuda12x==13.6.0
@@ -686,7 +688,9 @@ platformdirs==4.3.6
686688
plotly==5.24.1
687689
# via genai-perf
688690
pluggy==1.5.0
689-
# via pytest
691+
# via
692+
# pytest
693+
# pytest-cov
690694
polars==1.29.0
691695
# via mteb
692696
pooch==1.8.2
@@ -786,6 +790,7 @@ pytest==8.3.5
786790
# buildkite-test-collector
787791
# genai-perf
788792
# pytest-asyncio
793+
# pytest-cov
789794
# pytest-forked
790795
# pytest-mock
791796
# pytest-rerunfailures
@@ -796,6 +801,8 @@ pytest==8.3.5
796801
# terratorch
797802
pytest-asyncio==0.24.0
798803
# via -r requirements/test.in
804+
pytest-cov==6.3.0
805+
# via -r requirements/test.in
799806
pytest-forked==1.6.0
800807
# via -r requirements/test.in
801808
pytest-mock==3.14.0

0 commit comments

Comments
 (0)