Skip to content

Commit

Permalink
Switch fully to AdvancedDataRegressionFixture
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Mar 12, 2024
1 parent 490181d commit f7ab443
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion stubs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
git+https://github.com/domdfcoding/pytest-regressions-stubs
git+https://github.com/repo-helper/toml@py.typed
types-requests
5 changes: 2 additions & 3 deletions tests/test_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from domdf_python_tools.paths import PathPlus
from packaging.requirements import Requirement
from packaging.specifiers import Specifier, SpecifierSet
from pytest_regressions.data_regression import DataRegressionFixture
from typing_extensions import Literal

# this package
Expand Down Expand Up @@ -584,11 +583,11 @@ def test_list_requirements(
@pytest.mark.parametrize("depth", [-1, 0, 1, 2, 3])
# @pytest.mark.parametrize("depth", [3])
def test_list_requirements_pytest(
data_regression: DataRegressionFixture,
advanced_data_regression: AdvancedDataRegressionFixture,
depth: int,
py_version: str,
):
data_regression.check(list(list_requirements("pytest", depth=depth)))
advanced_data_regression.check(list(list_requirements("pytest", depth=depth)))


@pytest.fixture()
Expand Down
6 changes: 3 additions & 3 deletions tests/test_requirements_win.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# stdlib
import sys
from coincidence.regressions import AdvancedDataRegressionFixture

# 3rd party
import pytest
from coincidence import only_windows
from pytest_regressions.data_regression import DataRegressionFixture

# this package
from shippinglabel.requirements import list_requirements
Expand All @@ -29,8 +29,8 @@
)
@pytest.mark.parametrize("depth", [-1, 0, 1, 2, 3])
def test_list_requirements_pytest(
data_regression: DataRegressionFixture,
advanced_data_regression: AdvancedDataRegressionFixture,
depth: int,
py_version: str,
):
data_regression.check(list(list_requirements("pytest", depth=depth)))
advanced_data_regression.check(list(list_requirements("pytest", depth=depth)))
3 changes: 2 additions & 1 deletion tests/test_sdist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 3rd party
from coincidence.regressions import AdvancedDataRegressionFixture
import pytest
from packaging.utils import InvalidSdistFilename
from pytest_regressions.data_regression import DataRegressionFixture
Expand Down Expand Up @@ -41,7 +42,7 @@
"numpy-1.16.5.zip",
]
)
def test_parse_sdist_filename(filename: str, advanced_data_regression: DataRegressionFixture):
def test_parse_sdist_filename(filename: str, advanced_data_regression: AdvancedDataRegressionFixture):
parsed_filename = parse_sdist_filename(filename)
advanced_data_regression.check(parsed_filename)
assert str(parsed_filename) == filename
Expand Down

0 comments on commit f7ab443

Please sign in to comment.