diff --git a/tests/test_integration.py b/tests/test_integration.py index 068e1cc8..6aa23fab 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -48,7 +48,15 @@ def sampleproject_dist(tmp_path_factory: pytest.TempPathFactory): run([sys.executable, "-m", "build", "--sdist"], cwd=checkout) [dist, *_] = (checkout / "dist").glob("*") - assert dist.name == f"twine-sampleproject-3.0.0.post{tag}.tar.gz" + # NOTE: newer versions of setuptools (invoked via build) adhere to PEP 625, + # causing the dist name to be `twine_sampleproject` instead of + # `twine-sampleproject`. Both are allowed here for now, but the hyphenated + # version can be removed eventually. + # See: https://github.com/pypa/setuptools/issues/3593 + assert dist.name in ( + f"twine-sampleproject-3.0.0.post{tag}.tar.gz", + f"twine_sampleproject-3.0.0.post{tag}.tar.gz", + ) return dist diff --git a/tox.ini b/tox.ini index c9c9ae01..9dd7b847 100644 --- a/tox.ini +++ b/tox.ini @@ -79,13 +79,17 @@ commands = [testenv:types] deps = mypy - lxml + # required for report generation. 5.2.1 is forbidden due to an observed + # broken wheel on CPython 3.8: + # https://bugs.launchpad.net/lxml/+bug/2064158 + lxml >= 5.2.0, != 5.2.1 # required for more thorough type declarations keyring >= 22.3 # consider replacing with `mypy --install-types` when # https://github.com/python/mypy/issues/10600 is resolved types-requests commands = + pip list mypy --html-report mypy --txt-report mypy {posargs:twine} python -c 'with open("mypy/index.txt") as f: print(f.read())'