Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: virtual-arguments Changeset: r54392:311b1249ebd5 Date: 2012-04-14 10:49 +0200 http://bitbucket.org/pypy/pypy/changeset/311b1249ebd5/
Log: a test for _dont_jit diff --git a/pypy/interpreter/test/test_argument.py b/pypy/interpreter/test/test_argument.py --- a/pypy/interpreter/test/test_argument.py +++ b/pypy/interpreter/test/test_argument.py @@ -79,6 +79,8 @@ return list(it) def view_as_kwargs(self, x): + if len(x) == 0: + return [], [] return None, None def newdict(self, kwargs=False): @@ -320,6 +322,19 @@ assert l == [1, 2, 3, {'d': 4}] assert isinstance(l[-1], kwargsdict) + def test_match_kwds_creates_kwdict(self): + space = DummySpace() + kwds = [("c", 3), ('d', 4)] + for i in range(4): + kwds_w = dict(kwds[:i]) + keywords = kwds_w.keys() + keywords_w = kwds_w.values() + w_kwds = dummy_wrapped_dict(kwds[i:]) + if i == 3: + w_kwds = None + args = Arguments(space, [1, 2], keywords, keywords_w, w_starstararg=w_kwds) + assert args._dont_jit == (i != 3) + def test_duplicate_kwds(self): space = DummySpace() excinfo = py.test.raises(OperationError, Arguments, space, [], ["a"], _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit