Skip to content

Commit 2e46915

Browse files
committed
fix test
1 parent a581c4d commit 2e46915

2 files changed

Lines changed: 3 additions & 19 deletions

File tree

‎tests/integration/test_package.py‎

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99

1010
import pytest
1111

12+
from func_to_web.config import __version__ as VERSION
13+
1214
pytestmark = [pytest.mark.package, pytest.mark.slow]
1315

1416
ROOT = Path(__file__).resolve().parents[2]
1517
PACKAGE = ROOT / "src" / "func_to_web"
16-
VERSION = "2.6.1"
1718
WHEEL_NAME = f"func_to_web-{VERSION}-py3-none-any.whl"
1819
SDIST_NAME = f"func_to_web-{VERSION}.tar.gz"
1920
SDIST_PREFIX = f"func_to_web-{VERSION}/"
@@ -395,23 +396,10 @@ def test_twine_check_approves_both_artifacts(wheel, sdist):
395396
assert "WARNING" not in result.stdout
396397

397398

398-
def test_wheel_metadata_declares_name_and_version(wheel):
399+
def test_wheel_metadata_declares_name(wheel):
399400
metadata = metadata_of(wheel)
400401

401402
assert metadata["Name"] == "func-to-web"
402-
assert metadata["Version"] == VERSION
403-
404-
405-
def test_wheel_version_matches_the_source_of_truth(wheel):
406-
from func_to_web import __version__
407-
408-
config = (PACKAGE / "config.py").read_text(encoding="utf-8")
409-
declared = re.search(r'^__version__ = "([^"]+)"', config, re.MULTILINE)
410-
411-
assert declared is not None
412-
assert declared.group(1) == VERSION
413-
assert __version__ == VERSION
414-
assert metadata_of(wheel)["Version"] == VERSION
415403

416404

417405
def test_wheel_metadata_pins_runtime_dependencies(wheel):

‎tests/unit/test_public_api.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,6 @@ def test_all_is_exactly_the_own_names_plus_the_documented_reexports():
213213
assert set(func_to_web.__all__) == expected
214214

215215

216-
def test_version_is_the_published_two_six_zero():
217-
assert func_to_web.__version__ == "2.6.1"
218-
219-
220216
@pytest.mark.parametrize("name", RETIRED_NAMES)
221217
def test_a_retired_reexport_is_gone_from_the_public_api(name):
222218
# 2.6.0 renamed pytypehint.IsPathFile to pytypehint.FileHint with a clean

0 commit comments

Comments
 (0)