diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-03-20 11:26:02 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-03-20 11:26:02 -0400 |
commit | b0b1e20ff4c4b96ef1793ad58cd7643aee684d3a (patch) | |
tree | ec1ade473753d85721d9f5b393ea22518f253d92 | |
parent | 0a57282d45e72606b7d64bb77e4438ceae6c354e (diff) | |
download | python-setuptools-bitbucket-b0b1e20ff4c4b96ef1793ad58cd7643aee684d3a.tar.gz |
Add test capturing failure to parse package names with hyphens. Ref #307
-rw-r--r-- | pkg_resources/tests/test_resources.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index a55478a2..92f076a1 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -207,6 +207,16 @@ class TestDistro: with pytest.raises(pkg_resources.UnknownExtra): d.requires(["foo"]) + def test_pkg_name_with_hyphen(self): + "Package names with hyphens are supported" + name = 'setuptools-markdown-1.0.egg' + dist = Distribution.from_filename(name) + assert dist.project_name == "setuptools-markdown" + assert dist.key == "setuptools-markdown" + assert dist.version == "1.0" + assert dist.py_version is None + assert dist.platform is None + class TestWorkingSet: def test_find_conflicting(self): |