Commit 555a1ba9 authored by Jeremy Hylton's avatar Jeremy Hylton

Freshen the test suite.

Make sure test_MultiMapping doesn't rely on the order in which dict
entries are printed.
parent a4c3c528
...@@ -3,5 +3,5 @@ test_MultiMapping ...@@ -3,5 +3,5 @@ test_MultiMapping
2 2
3 3
2 2
{'spam': 3} [('spam', 3)]
{'eggs': 2, 'spam': 1} [('eggs', 2), ('spam', 1)]
...@@ -11,9 +11,12 @@ ...@@ -11,9 +11,12 @@
# FOR A PARTICULAR PURPOSE # FOR A PARTICULAR PURPOSE
# #
############################################################################## ##############################################################################
from pprint import pprint
from MultiMapping import * from MultiMapping import *
def sortprint(L):
L.sort()
print L
m=MultiMapping() m=MultiMapping()
m.push({'spam':1, 'eggs':2}) m.push({'spam':1, 'eggs':2})
...@@ -26,8 +29,8 @@ m.push({'spam':3}) ...@@ -26,8 +29,8 @@ m.push({'spam':3})
print m['spam'] print m['spam']
print m['eggs'] print m['eggs']
pprint(m.pop()) sortprint(m.pop().items())
pprint(m.pop()) sortprint(m.pop().items())
try: try:
print m.pop() print m.pop()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment