Skip to content

Commit e724dbc

Browse files
committed
Ensure the imports from "domdf_python_tools" do not affect its coverage measurements.
1 parent ed08479 commit e724dbc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

coverage_pyver_pragma/grammar.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,7 @@
160160
# This ensures coverage.py records the correct coverage for these modules
161161
# when they are under test
162162

163-
for module in [
164-
"domdf_python_tools",
165-
"domdf_python_tools.doctools",
166-
"domdf_python_tools.stringlist",
167-
]:
163+
for module in [m for m in sys.modules if m.startswith("domdf_python_tools")]:
168164
if module in sys.modules:
169165
del sys.modules[module]
170166

0 commit comments

Comments
 (0)