Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/migrate_extrinsic_metadata/test_pypi.py
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
def test_pypi_project_from_filename(): | def test_pypi_project_from_filename(): | ||||
files = [ | files = [ | ||||
("django-agent-trust-0.1.8.tar.gz", "django-agent-trust"), | ("django-agent-trust-0.1.8.tar.gz", "django-agent-trust"), | ||||
("python_test-1.0.1.zip", "python_test"), | ("python_test-1.0.1.zip", "python_test"), | ||||
("py-evm-0.2.0a9.tar.gz", "py-evm"), | ("py-evm-0.2.0a9.tar.gz", "py-evm"), | ||||
("collective.texttospeech-1.0rc1.tar.gz", "collective.texttospeech"), | ("collective.texttospeech-1.0rc1.tar.gz", "collective.texttospeech"), | ||||
("flatland-fork-0.4.post1.dev40550160.zip", "flatland-fork"), | ("flatland-fork-0.4.post1.dev40550160.zip", "flatland-fork"), | ||||
("fake-factory-0.5.6-proper.tar.gz", "fake-factory"), | |||||
("ariane_procos-0.1.2-b05.tar.gz", "ariane_procos"), | |||||
("Yelpy-0.2.2dev.tar.gz", "Yelpy"), | |||||
] | ] | ||||
for (filename, project) in files: | for (filename, project) in files: | ||||
assert pypi_project_from_filename(filename) == project | assert pypi_project_from_filename(filename) == project | ||||
def test_pypi_1(): | def test_pypi_1(): | ||||
"""Tests loading a revision generated by a new PyPI loader that | """Tests loading a revision generated by a new PyPI loader that | ||||
▲ Show 20 Lines • Show All 424 Lines • Show Last 20 Lines |