Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace remaining pypi.io with pypi.org #556

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions tests/test_py_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,29 +125,29 @@ def test_get_sdist_metadata_packages_top_level():
# This package only includes a pyproject.toml (no setup.py)
# As setuptools is used, the module name can be retrieved
# from top_level.txt in the sdist
pkg_name = "tangods-achtung"
pkg_name_nor = pkg_name.replace("-", "_")
name = "tangods-achtung"
name_nor = name.replace("-", "_")
pkg_ver = "0.11.1"
sdist_metadata = get_sdist_metadata(
f"https://pypi.io/packages/source/t/{pkg_name}/{pkg_name_nor}-{pkg_ver}.tar.gz",
Configuration(name=pkg_name, version=pkg_ver),
f"https://pypi.org/packages/source/t/{name}/{name_nor}-{pkg_ver}.tar.gz",
Configuration(name=name, version=pkg_ver),
)
assert sdist_metadata["name"] == pkg_name
assert sdist_metadata["name"] == name
assert sdist_metadata["packages"] == ["achtung"]


def test_get_sdist_metadata_no_top_level():
"""Regression test when top_level.txt doesn't exist"""
# This package only includes a pyproject.toml (no setup.py)
# As hatchling is used, there is no top_level.txt file
pkg_name = "gidgetlab-kit"
pkg_name_nor = pkg_name.replace("-", "_")
name = "gidgetlab-kit"
name_nor = name.replace("-", "_")
pkg_ver = "0.7.2"
sdist_metadata = get_sdist_metadata(
f"https://pypi.io/packages/source/g/{pkg_name}/{pkg_name_nor}-{pkg_ver}.tar.gz",
Configuration(name=pkg_name, version=pkg_ver),
f"https://pypi.org/packages/source/g/{name}/{name_nor}-{pkg_ver}.tar.gz",
Configuration(name=name, version=pkg_ver),
)
assert sdist_metadata["name"] == pkg_name
assert sdist_metadata["name"] == name
# No solution to retrieve packages for now
assert sdist_metadata.get("packages") is None

Expand Down
Loading