diff options
-rw-r--r-- | .travis.yml | 3 | ||||
-rw-r--r-- | HISTORY.md | 1 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | pystache/tests/test_locator.py | 12 | ||||
-rw-r--r-- | tox.ini | 4 |
5 files changed, 16 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index bad487d..a426b13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,7 @@ python: - 2.6 - 2.7 - 3.2 - # TODO: get all tests passing with PyPy. - #- pypy + - pypy script: - python setup.py install @@ -10,6 +10,7 @@ History parse tree. - Added support for rendering pre-compiled templates. - Added --force2to3 option to setup.py (issue \#121). +- Added support for [PyPy](http://pypy.org/). - Added support for [Travis CI](http://travis-ci.org) (issue \#124). [msabramo] - Bugfix: exceptions raised from a property are no longer swallowed when getting a key from a context stack (issue \#110). @@ -39,6 +39,7 @@ Pystache is tested with-- - Python 2.7 - Python 3.1 - Python 3.2 +- [PyPy](http://pypy.org/) [Distribute](http://packages.python.org/distribute/) (the setuptools fork) is recommended over [setuptools](http://pypi.python.org/pypi/setuptools), 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) @@ -3,7 +3,7 @@ # http://pypi.python.org/pypi/tox # [tox] -envlist = py24,py25,py26,py27,py27-yaml,py27-noargs,py31,py32 +envlist = py24,py25,py26,py27,py27-yaml,py27-noargs,py31,py32,pypy [testenv] # Change the working directory so that we don't import the pystache located @@ -11,7 +11,7 @@ envlist = py24,py25,py26,py27,py27-yaml,py27-noargs,py31,py32 changedir = {envbindir} commands = - pystache-test {toxinidir}/ext/spec/specs {toxinidir} + pystache-test {toxinidir}/ext/spec/specs {toxinidir} # Check that the spec tests work with PyYAML. [testenv:py27-yaml] |