Skip to content

Commit

Permalink
Update expected error message for new version of setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsmith committed Dec 24, 2023
1 parent 1594355 commit c0a7cc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[build-system]
# Leave the requirements unpinned, so we always test against the current versions.
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
11 changes: 7 additions & 4 deletions product/gradle-plugin/src/test/integration/test_gradle_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,13 +1150,16 @@ def sdist_native(self, name):

url = r"file:.*app/sdist_native"
if name in ["sdist_native_compiler", "sdist_native_cc"]:
# These tests fail at the egg_info stage, so the name and version are
# unavailable.
# These tests fail at the egg_info stage, so the name and version
# are unavailable.
req_str = url
else:
# These tests fail at the bdist_wheel stage, so the name and version
# have been obtained from egg_info.
req_str = f"{name.replace('_', '-')}==1.0 from {url}"
# have been obtained from egg_info. But how the name is formatted
# depends on whether we're using our bundled version of setuptools,
# or the current one from PyPI.
name_str = name if pep517 else name.replace('_', '-')
req_str = f"{name_str}==1.0 from {url}"
self.assertInLong(fr"Failed to install {req_str}." +
self.tracker_advice() + r"$", run.stderr, re=True)

Expand Down

0 comments on commit c0a7cc5

Please sign in to comment.