Skip to content

Commit 13be7ab

Browse files
authored
handle PEP 639 License-Expression in test metadata (#46)
1 parent 760aaa3 commit 13be7ab

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_metadata.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ def test_resolve_distribution_information():
99
fake_plugin_spec = PluginSpec("foo", "bar", pytest.fixture)
1010
dist = resolve_distribution_information(fake_plugin_spec)
1111
assert dist.metadata["Name"] == "pytest"
12-
assert dist.metadata["License"] == "MIT"
12+
# Support both legacy License field and PEP 639 License-Expression
13+
license_value = dist.metadata.get("License-Expression") or dist.metadata.get("License")
14+
assert license_value == "MIT"

0 commit comments

Comments
 (0)