summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-09-27 02:15:19 -0400
committerChris McDonough <chrism@plope.com>2011-09-27 02:15:19 -0400
commit54979dd45918ffbb411c8983d4194855856ed2aa (patch)
treed07f70db68ca3012d3079c4d49cfc349006949e2
parentbce463f00c7d022b039c075ad1ee607b216ddb0d (diff)
downloadpyramid-54979dd45918ffbb411c8983d4194855856ed2aa.tar.gz
pyramid-54979dd45918ffbb411c8983d4194855856ed2aa.tar.bz2
pyramid-54979dd45918ffbb411c8983d4194855856ed2aa.zip
add a test for builtins
-rw-r--r--pyramid/tests/test_util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pyramid/tests/test_util.py b/pyramid/tests/test_util.py
index 2883a968c..7c870bc45 100644
--- a/pyramid/tests/test_util.py
+++ b/pyramid/tests/test_util.py
@@ -1,4 +1,5 @@
import unittest
+from pyramid.compat import PY3
class TestDottedNameResolver(unittest.TestCase):
def _makeOne(self, package=None):
@@ -14,6 +15,14 @@ class TestDottedNameResolver(unittest.TestCase):
else:
raise AssertionError('Invalid not raised') # pragma: no cover
+ def test_zope_dottedname_style_resolve_builtin(self):
+ typ = self._makeOne()
+ if PY3:
+ result = typ._zope_dottedname_style('builtins.str')
+ else:
+ result = typ._zope_dottedname_style('__builtin__.str')
+ self.assertEqual(result, str)
+
def test_zope_dottedname_style_resolve_absolute(self):
typ = self._makeOne()
result = typ._zope_dottedname_style(