Skip to content

Commit 4525646

Browse files
committed
test: skip exclude_also test if coverage < 7.2
1 parent e9317c4 commit 4525646

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_pragma.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""Tests for {# pragma: no cover #} support in Django templates."""
55

66
import coverage
7+
import pytest
78
from django.template.loader import get_template
89

910
from .plugin_test import DjangoPluginTestCase
@@ -116,6 +117,7 @@ def test_custom_exclude_patterns(self):
116117
self.cov.save()
117118
self.assert_analysis([1, 5, 7, 9, 10], missing=[7]) # Expecting 1 missing line
118119

120+
@pytest.mark.skipif(coverage.version_info < (7, 2), reason="exclude_also requires coverage 7.2+")
119121
def test_exclude_also(self):
120122
"""Test that report:exclude_also patterns are picked up."""
121123
self.make_template("""\
@@ -132,7 +134,7 @@ def test_exclude_also(self):
132134
plugins = django_coverage_plugin
133135
[report]
134136
exclude_also = custom-exclude
135-
"""
137+
""",
136138
)
137139
tem = get_template(self.template_file)
138140
self.cov = coverage.Coverage(source=["."])

0 commit comments

Comments
 (0)