diff --git a/clastic/tests/test_meta.py b/clastic/tests/test_meta.py index c71759c..1e5fae6 100644 --- a/clastic/tests/test_meta.py +++ b/clastic/tests/test_meta.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals import os +import sys import json from clastic import Application, render_basic, StaticFileRoute, MetaApplication @@ -16,6 +17,8 @@ except: PY3 = True +IS_PYPY = '__pypy__' in sys.builtin_module_names + def test_meta_basic(): app = Application([('/meta', MetaApplication()), @@ -51,7 +54,7 @@ def ep_method(self): ('/callable_obj', obj, render_basic), StaticFileRoute('/file', _CUR_DIR + '/test_meta.py'), ('/meta', MetaApplication())] - if PY3: + if PY3 and not IS_PYPY: routes.append(('/builtin', sum, render_basic)) app = Application(routes=routes, @@ -59,7 +62,7 @@ def ep_method(self): cl = app.get_local_client() assert cl.get('/meta/').status_code == 200 - if not PY3: + if not PY3 or IS_PYPY: return resp = cl.get('/meta/json/')