From 2ac5b49729bed48133e7d5f6454791896b1c18e1 Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand Date: Wed, 21 Aug 2024 16:17:23 +0200 Subject: [PATCH] Replace remaining pypi.io with pypi.org Official domain is pypi.org Also changed some variable names to make flake8 happy about line length --- tests/test_py_base.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/test_py_base.py b/tests/test_py_base.py index e0b8fbf75..a5e19d61c 100644 --- a/tests/test_py_base.py +++ b/tests/test_py_base.py @@ -125,14 +125,14 @@ 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"] @@ -140,14 +140,14 @@ 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