1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
# stdlib
import sys
# 3rd party
import pytest
from coincidence import only_windows
from coincidence.regressions import AdvancedDataRegressionFixture
# this package
from shippinglabel.requirements import list_requirements
from tests.test_requirements import min_311, only_36, only_37
@only_windows("Output differs on Windows")
@pytest.mark.parametrize(
"py_version",
[
only_36,
only_37,
pytest.param(
"3.8+",
marks=pytest.mark.skipif(
not ((3, 8) <= sys.version_info[:2] < (3, 11)),
reason="Output differs on Python 3.8, 3.9, 3.10"
)
),
min_311,
]
)
@pytest.mark.parametrize("depth", [-1, 0, 1, 2, 3])
def test_list_requirements_pytest(
advanced_data_regression: AdvancedDataRegressionFixture,
depth: int,
py_version: str,
):
advanced_data_regression.check(list(list_requirements("pytest", depth=depth)))
|