Skip to content

Commit

Permalink
better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Jul 28, 2023
1 parent 8337dd8 commit dc74d85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/parse_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ def read_metadata(distribution: str) -> StubMetadata:
assert isinstance(upstream_repository, (str, type(None)))
if isinstance(upstream_repository, str):
parsed_url = urllib.parse.urlsplit(upstream_repository)
assert parsed_url.scheme == "https", "URLs in the upstream_repository key should use https"
assert not parsed_url.netloc.startswith("www."), "`www.` should be removed from URLs in the upstream_repository key"
assert parsed_url.scheme == "https", "URLs in the upstream_repository field should use https"
assert not parsed_url.netloc.startswith("www."), "`www.` should be removed from URLs in the upstream_repository field"
assert not parsed_url.query
assert not parsed_url.fragment
if parsed_url.netloc == "github.com":
Expand Down

0 comments on commit dc74d85

Please sign in to comment.