4
4
5
5
# 3rd party
6
6
import coverage # type: ignore
7
+ import pytest
8
+ from coincidence import only_version
7
9
from coincidence .regressions import check_file_regression
8
10
from coverage .python import PythonParser # type: ignore
9
11
from domdf_python_tools .paths import PathPlus
13
15
import coverage_pyver_pragma
14
16
15
17
16
- def test_plugin (tmp_pathplus : PathPlus , file_regression : FileRegressionFixture ):
18
+ @pytest .mark .parametrize ("version" , [
19
+ pytest .param ("3.6" , marks = only_version (3.6 , "Output differs on each version." )),
20
+ pytest .param ("3.7" , marks = only_version (3.7 , "Output differs on each version." )),
21
+ pytest .param ("3.8" , marks = only_version (3.8 , "Output differs on each version." )),
22
+ pytest .param ("3.9" , marks = only_version (3.9 , "Output differs on each version." )),
23
+ ])
24
+ def test_plugin (tmp_pathplus : PathPlus , file_regression : FileRegressionFixture , version ):
17
25
coverage_pyver_pragma .coverage_init ()
18
26
19
27
assert PythonParser .lines_matching is coverage_pyver_pragma .PythonParser .lines_matching
@@ -29,6 +37,7 @@ def test_plugin(tmp_pathplus: PathPlus, file_regression: FileRegressionFixture):
29
37
30
38
output = StringIO ()
31
39
cov .report (morfs = [tests .demo_code .__file__ ], file = output )
40
+ # cov.html_report(morfs=[tests.demo_code.__file__])
32
41
cov .erase ()
33
42
34
43
buf = output .getvalue ().replace (tests .demo_code .__file__ , "demo_code.py" )
0 commit comments