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 | a54a764326d516950861d2d317150e7e172bd99f (patch) | |
| tree | 2860835537b5911f31ff77ace7fdfb749285b736 /pkg_resources | |
| parent | 3ff70513dceb10287c79ca9eb902e42b74f3e55f (diff) | |
| download | python-setuptools-git-a54a764326d516950861d2d317150e7e172bd99f.tar.gz | |
Add test capturing failure to parse package names with hyphens. Ref #307
Diffstat (limited to 'pkg_resources')
| -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): |
