44
55# 3rd party
66import coverage # type: ignore
7+ import pytest
8+ from coincidence import only_version
79from coincidence .regressions import check_file_regression
810from coverage .python import PythonParser # type: ignore
911from domdf_python_tools .paths import PathPlus
1315import coverage_pyver_pragma
1416
1517
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 ):
1725 coverage_pyver_pragma .coverage_init ()
1826
1927 assert PythonParser .lines_matching is coverage_pyver_pragma .PythonParser .lines_matching
@@ -29,6 +37,7 @@ def test_plugin(tmp_pathplus: PathPlus, file_regression: FileRegressionFixture):
2937
3038 output = StringIO ()
3139 cov .report (morfs = [tests .demo_code .__file__ ], file = output )
40+ # cov.html_report(morfs=[tests.demo_code.__file__])
3241 cov .erase ()
3342
3443 buf = output .getvalue ().replace (tests .demo_code .__file__ , "demo_code.py" )
0 commit comments