summaryrefslogtreecommitdiff
path: root/pystache
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-06-29 11:21:50 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-06-29 11:21:50 -0700
commit72b515bb673cfbaf287276ad7c9475d4588cd0c0 (patch)
tree55532b0eabd66f13efe777c78c1fcd1c8f5b1b8b /pystache
parente76ec45981646414e3f0a250953133d11dd90a25 (diff)
downloadpystache-72b515bb673cfbaf287276ad7c9475d4588cd0c0.tar.gz
Add support for PyPy (issue #125).
Diffstat (limited to 'pystache')
-rw-r--r--pystache/tests/test_locator.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pystache/tests/test_locator.py b/pystache/tests/test_locator.py
index f17a289..8d4ec9b 100644
--- a/pystache/tests/test_locator.py
+++ b/pystache/tests/test_locator.py
@@ -53,7 +53,17 @@ class LocatorTests(unittest.TestCase, AssertExceptionMixin):
def test_get_object_directory__not_hasattr_module(self):
locator = Locator()
- obj = datetime(2000, 1, 1)
+ # Previously, we used a genuine object -- a datetime instance --
+ # because datetime instances did not have the __module__ attribute
+ # in CPython. See, for example--
+ #
+ # http://bugs.python.org/issue15223
+ #
+ # However, since datetime instances do have the __module__ attribute
+ # in PyPy, we needed to switch to something else once we added
+ # support for PyPi. This was so that our test runs would pass
+ # in all systems.
+ obj = "abc"
self.assertFalse(hasattr(obj, '__module__'))
self.assertEqual(locator.get_object_directory(obj), None)