From: Stefan Behnel Date: Sat, 25 Oct 2008 09:16:16 +0000 (+0200) Subject: updated test case X-Git-Tag: 0.9.9.2.beta~25 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=344e435ffea13bb6b6e68b75b688880e2efbdd1e;p=cython.git updated test case --- diff --git a/tests/run/dictintindex.pyx b/tests/run/dictintindex.pyx index 2c4ac45f..d9bec0e5 100644 --- a/tests/run/dictintindex.pyx +++ b/tests/run/dictintindex.pyx @@ -1,12 +1,18 @@ __doc__ = u""" ->>> test() +>>> test_index() 1 +>>> test_del() +Traceback (most recent call last): +KeyError: 0 """ -def test(): +def test_index(): cdef int key = 0 + d = {0:1} + return d[key] +def test_del(): + cdef int key = 0 d = {0:1} - print d[key] del d[key] - print d[key] + return d[key]