[Bug 525015] [NEW] additional (failing) tests for dict

0 views
Skip to first unread message

R. David Murray

unread,
Feb 20, 2010, 2:44:13 PM2/20/10
to pynie-dev-ga...@googlegroups.com
Public bug reported:

Played with pynie after the pycon talk (nice talk), and noticed that the
(very new!) dict support has a few issues :). Here are a couple of
tests for things I noticed.

** Affects: pynie
Importance: Undecided
Status: New

--
additional (failing) tests for dict
https://bugs.launchpad.net/bugs/525015
You received this bug notification because you are a member of pynie-
dev, which is the registrant for Pynie.

Status in Pynie - Python on Parrot: New

Bug description:
Played with pynie after the pycon talk (nice talk), and noticed that the (very new!) dict support has a few issues :). Here are a couple of tests for things I noticed.


R. David Murray

unread,
Feb 20, 2010, 2:44:13 PM2/20/10
to pynie-dev-ga...@googlegroups.com

** Patch added: "additional dict tests"
http://launchpadlibrarian.net/39454995/dict_tests.patch

Allison Randal

unread,
Feb 20, 2010, 9:25:47 PM2/20/10
to pynie-dev-ga...@googlegroups.com
Thanks, these are great! I've committed the test with the fixes to make
it pass.

One of the tests didn't work in Python 3 (I found an explanation in
http://blog.labix.org/2008/06/27/watch-out-for-listdictkeys-in-
python-3):

Traceback (most recent call last):
File "Lib/test/bootstrap/dicts.py", line 25, in <module>
if a.keys()[0] == 1: print('success: integer as index')
TypeError: 'dict_keys' object does not support indexing

So I tweaked that test to:

a = {1: 2}
b = list(a.keys())
if b[0] == 1: print('success: integer as index')

Thanks for the contribution!


** Changed in: pynie
Status: New => Fix Committed

--
additional (failing) tests for dict
https://bugs.launchpad.net/bugs/525015
You received this bug notification because you are a member of pynie-
dev, which is the registrant for Pynie.

Status in Pynie - Python on Parrot: Fix Committed

Reply all
Reply to author
Forward
0 new messages