Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-16 08:49:37

0001 from importlib.metadata import PackageNotFoundError, metadata
0002 from pathlib import Path
0003 
0004 import pytest
0005 
0006 REFERENCE = Path(__file__).resolve().parents[3] / "CI" / "pypi_readme.md"
0007 
0008 
0009 @pytest.mark.pypi
0010 def test_pypi_readme():
0011     """The readme in the wheel metadata, i.e. the PyPI landing page, matches the
0012     checked-in CI/pypi_readme.md, so changes to the page show up in review."""
0013     try:
0014         readme = metadata("pyacts").json["description"]
0015     except PackageNotFoundError:
0016         pytest.skip("pyacts wheel not installed")
0017 
0018     expected = REFERENCE.read_text().rstrip("\n")
0019     assert (
0020         readme.rstrip("\n") == expected
0021     ), "PyPI readme changed, run `uvx hatch-fancy-pypi-readme -o CI/pypi_readme.md`"