Skip to content

Commit c5ec350

Browse files
committed
Move fixed_version_number fixture into conftest.
1 parent 228dcda commit c5ec350

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

tests/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,16 @@
2020
# MA 02110-1301, USA.
2121
#
2222

23+
# 3rd party
24+
import pytest
25+
26+
# this package
27+
from repo_helper.configuration import metadata
28+
2329
pytest_plugins = ("domdf_python_tools.testing", "repo_helper.testing")
30+
31+
32+
@pytest.fixture()
33+
def fixed_version_number(monkeypatch):
34+
monkeypatch.setattr(metadata.version, "validator", lambda *args: "2020.12.18")
35+
yield

tests/test_cli/test_show.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ def test_changelog(tmp_repo, file_regression: FileRegressionFixture):
9292
]
9393

9494

95-
@pytest.fixture()
96-
def fixed_version_number(monkeypatch):
97-
monkeypatch.setattr(metadata.version, "validator", lambda *args: "2020.12.18")
98-
yield
99-
100-
10195
class ShowRequirementsTest:
10296

10397
@version_specific

0 commit comments

Comments
 (0)