mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fix bad bug in structseq slicing (NULL pointers in result). Reported by
Jack Jansen on python-dev. Add simple test case. Move vereq() from test_descr to test_support (it's handy!).
This commit is contained in:
parent
5ded1bf5c7
commit
c2fe618575
4 changed files with 22 additions and 6 deletions
|
@ -117,6 +117,10 @@ def verify(condition, reason='test failed'):
|
|||
if not condition:
|
||||
raise TestFailed(reason)
|
||||
|
||||
def vereq(a, b):
|
||||
if not (a == b):
|
||||
raise TestFailed, "%r == %r" % (a, b)
|
||||
|
||||
def sortdict(dict):
|
||||
"Like repr(dict), but in sorted order."
|
||||
items = dict.items()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue