Skip to content

Commit

Permalink
test_integration: all PEP 625 sdist name
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <william@yossarian.net>
  • Loading branch information
woodruffw committed Apr 29, 2024
1 parent 48af4c1 commit d31e6e5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d31e6e5

Please sign in to comment.