Skip to content

Commit d6fd4c9

Browse files
authored
Merge pull request #7666 from hugovk/coverage-exclude_also
Coverage: add more exclusions
2 parents 2c75cac + d26880c commit d6fd4c9

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

.coveragerc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33
[report]
44
# Regexes for lines to exclude from consideration
5-
exclude_lines =
6-
# Have to re-enable the standard pragma:
7-
pragma: no cover
8-
9-
# Don't complain if non-runnable code isn't run:
5+
exclude_also =
6+
# Don't complain if non-runnable code isn't run
107
if 0:
118
if __name__ == .__main__.:
129
# Don't complain about debug code
1310
if DEBUG:
11+
# Don't complain about compatibility code for missing optional dependencies
12+
except ImportError
1413

1514
[run]
1615
omit =

Tests/test_imagemorph.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,6 @@ def test_str_to_img():
5757
assert_image_equal_tofile(A, "Tests/images/morph_a.png")
5858

5959

60-
def create_lut():
61-
for op in ("corner", "dilation4", "dilation8", "erosion4", "erosion8", "edge"):
62-
lb = ImageMorph.LutBuilder(op_name=op)
63-
lut = lb.build_lut()
64-
with open(f"Tests/images/{op}.lut", "wb") as f:
65-
f.write(lut)
66-
67-
68-
# create_lut()
6960
@pytest.mark.parametrize(
7061
"op", ("corner", "dilation4", "dilation8", "erosion4", "erosion8", "edge")
7162
)

0 commit comments

Comments
 (0)