Skip to content

Commit c70071b

Browse files
authored
Merge pull request #1012 from linsword13/test-cov
Exclude top-level import statements from coverage
2 parents 6b4ecac + 17d17ca commit c70071b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ exclude_lines = [
7777
'if 0:',
7878
'if False:',
7979
'if __name__ == .__main__.:',
80+
81+
# Ignore import statements:
82+
# Imports (and defs) are not counted due to coverage being run after
83+
# these modules are already initialized.
84+
'^import .*',
85+
'^from .* import .*',
8086
]
8187
ignore_errors = true
8288
include = [

0 commit comments

Comments
 (0)