Fix the license tests

This commit is contained in:
Reid 'arrdem' McKenzie 2023-05-03 23:08:18 -06:00
parent 33be6c1fe9
commit 584dbfe610

View file

@ -123,8 +123,8 @@ def licenses(dist: DistInfoDistribution):
@pytest.mark.parametrize(
"dist",
(w for w in working_set if w.location.find("arrdem_source_pypi") != -1),
ids=lambda dist: dist.project_name,
(w for w in working_set if w.location.find("pypi_") != -1),
ids=lambda dist: getattr(dist, "project_name", "unknown"),
)
def test_approved_license(dist: DistInfoDistribution):
"""Ensure that a given package is either allowed by name or uses an approved license."""