Skip to content

Commit

Permalink
pypy3's sum takes a kwarg, unlike cpy3. anyways...
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud committed Oct 13, 2023
1 parent bf6319f commit 8022ca1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions clastic/tests/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import unicode_literals

import os
import sys
import json

from clastic import Application, render_basic, StaticFileRoute, MetaApplication
Expand All @@ -16,6 +17,8 @@
except:
PY3 = True

IS_PYPY = '__pypy__' in sys.builtin_module_names


def test_meta_basic():
app = Application([('/meta', MetaApplication()),
Expand Down Expand Up @@ -51,15 +54,15 @@ 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,
resources={'iterable': [1, 2, 3], 'start': 0})

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/')
Expand Down

0 comments on commit 8022ca1

Please sign in to comment.