Commit 72b515bb by Chris Jerdonek

Add support for PyPy (issue #125).

parent e76ec459
...@@ -6,8 +6,7 @@ python: ...@@ -6,8 +6,7 @@ python:
- 2.6 - 2.6
- 2.7 - 2.7
- 3.2 - 3.2
# TODO: get all tests passing with PyPy. - pypy
#- pypy
script: script:
- python setup.py install - python setup.py install
......
...@@ -10,6 +10,7 @@ History ...@@ -10,6 +10,7 @@ History
parse tree. parse tree.
- Added support for rendering pre-compiled templates. - Added support for rendering pre-compiled templates.
- Added --force2to3 option to setup.py (issue \#121). - 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] - Added support for [Travis CI](http://travis-ci.org) (issue \#124). [msabramo]
- Bugfix: exceptions raised from a property are no longer swallowed - Bugfix: exceptions raised from a property are no longer swallowed
when getting a key from a context stack (issue \#110). when getting a key from a context stack (issue \#110).
......
...@@ -39,6 +39,7 @@ Pystache is tested with-- ...@@ -39,6 +39,7 @@ Pystache is tested with--
- Python 2.7 - Python 2.7
- Python 3.1 - Python 3.1
- Python 3.2 - Python 3.2
- [PyPy](http://pypy.org/)
[Distribute](http://packages.python.org/distribute/) (the setuptools fork) [Distribute](http://packages.python.org/distribute/) (the setuptools fork)
is recommended over [setuptools](http://pypi.python.org/pypi/setuptools), is recommended over [setuptools](http://pypi.python.org/pypi/setuptools),
......
...@@ -53,7 +53,17 @@ class LocatorTests(unittest.TestCase, AssertExceptionMixin): ...@@ -53,7 +53,17 @@ class LocatorTests(unittest.TestCase, AssertExceptionMixin):
def test_get_object_directory__not_hasattr_module(self): def test_get_object_directory__not_hasattr_module(self):
locator = Locator() 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.assertFalse(hasattr(obj, '__module__'))
self.assertEqual(locator.get_object_directory(obj), None) self.assertEqual(locator.get_object_directory(obj), None)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# http://pypi.python.org/pypi/tox # http://pypi.python.org/pypi/tox
# #
[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] [testenv]
# Change the working directory so that we don't import the pystache located # 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 ...@@ -11,7 +11,7 @@ envlist = py24,py25,py26,py27,py27-yaml,py27-noargs,py31,py32
changedir = changedir =
{envbindir} {envbindir}
commands = commands =
pystache-test {toxinidir}/ext/spec/specs {toxinidir} pystache-test {toxinidir}/ext/spec/specs {toxinidir}
# Check that the spec tests work with PyYAML. # Check that the spec tests work with PyYAML.
[testenv:py27-yaml] [testenv:py27-yaml]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment