Repository navigation
Expand file tree
/
Copy path.coveragerc
More file actions
160 lines (123 loc) · 3.13 KB
/
Copy path.coveragerc
File metadata and controls
160 lines (123 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# .coveragerc to control coverage.py
# This file provides an alternative to pytest.ini configuration
# Both can coexist, with command line options taking precedence
[run]
# Source code to measure coverage for
source = gmoo_sdk
# Omit these files/directories from coverage
omit =
*/tests/*
*/test_*
*/setup.py
*/__init__.py
*/site-packages/*
*/dist-packages/*
*/.venv/*
*/venv/*
*/.tox/*
*/migrations/*
*/config/*
# Enable branch coverage
branch = True
# Parallel coverage collection (useful for multiprocess testing)
parallel = True
# Include namespace packages
source_pkgs = gmoo_sdk
# Data file for coverage results
data_file = .coverage
# Dynamic context is handled by pytest-cov plugin
# dynamic_context = test_function
[report]
# Precision for coverage percentages
precision = 2
# Minimum coverage percentage required
fail_under = 70
# Skip files with no executable code
skip_empty = True
# Skip files that are completely covered
skip_covered = False
# Show missing line numbers
show_missing = True
# Exclude these lines from coverage
exclude_lines =
# Standard pragma
pragma: no cover
# Don't complain about missing debug-only code
def __repr__
def __str__
# Don't complain if tests don't hit defensive assertion code
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run
if 0:
if False:
if __name__ == .__main__.
if TYPE_CHECKING:
# Don't complain about abstract methods
@abstractmethod
@abc.abstractmethod
# Ignore property setters/getters
@property
@.*.setter
@.*.deleter
# Ignore protocol definitions
class .*\(Protocol\):
class .*\(typing.Protocol\):
# Defensive programming
except ImportError:
except NameError:
# Platform-specific code
if sys.platform
# Debugging code
if DEBUG:
if debug:
# Deprecated code
warnings.warn
@deprecated
# Pass statements
pass
\.\.\.
# Partial branch patterns to exclude
exclude_also =
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
# Ignore missing files
ignore_errors = True
# Sort the report by coverage percentage
sort = Cover
[html]
# Directory for HTML coverage report
directory = htmlcov
# Title for the report
title = GMOO SDK Python Coverage Report
# Show line numbers that are missing coverage
show_contexts = True
# Include these files in the report
# include_namespace_packages = True # Not supported in this version
[xml]
# Output file for XML coverage report
output = coverage.xml
[json]
# Output file for JSON coverage report
output = coverage.json
# Pretty print JSON
pretty_print = True
# Show contexts
show_contexts = True
[paths]
# Map coverage paths for different environments
# This helps when combining coverage from different environments
source =
gmoo_sdk/
*/gmoo_sdk/
*/site-packages/gmoo_sdk/
*/src/gmoo_sdk/
D:\*/gmoo_sdk/
C:\*/gmoo_sdk/
# Test paths equivalence
tests =
tests/
*/tests/
test/
*/test/