summaryrefslogtreecommitdiff
path: root/pkg_resources/tests/test_resources.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-06 09:48:30 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-06 09:48:30 -0500
commit32ce474415accc4ad11fdbab57f7a65176d4197b (patch)
treed3da606e17387f27b662174c4928c1e4e024a72d /pkg_resources/tests/test_resources.py
parent6fe9a6147ff850b64ffc241f65c2411f53fb34c4 (diff)
downloadpython-setuptools-git-32ce474415accc4ad11fdbab57f7a65176d4197b.tar.gz
Restore support for printable characters in the entry point name. Fixes #327.
Diffstat (limited to 'pkg_resources/tests/test_resources.py')
-rw-r--r--pkg_resources/tests/test_resources.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py
index f252ddff..4a82167b 100644
--- a/pkg_resources/tests/test_resources.py
+++ b/pkg_resources/tests/test_resources.py
@@ -2,6 +2,7 @@ import os
import sys
import tempfile
import shutil
+import string
import pytest
@@ -302,6 +303,16 @@ class TestEntryPoints:
except ValueError: pass
else: raise AssertionError("Should've been bad", ep)
+ def test_printable_name(self):
+ """
+ Allow any printable character in the name.
+ """
+ # Create a name with all printable characters; strip the whitespace.
+ name = string.printable.strip()
+ spec = "{name} = module:attr".format(**locals())
+ ep = EntryPoint.parse(spec)
+ assert ep.name == name
+
def checkSubMap(self, m):
assert len(m) == len(self.submap_expect)
for key, ep in pkg_resources.iteritems(self.submap_expect):