summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_collections.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2009-06-12 21:52:14 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2009-06-12 21:52:14 (GMT)
commit450ae573bcf3b8b9e910dacf5dcf640cced44b97 (patch)
tree291a7e3d6112f8997b6bee501d5ad5c4b928e186 /Lib/test/test_collections.py
parentf0c9e46cdeff1ce6f55252083cfaec28406d189c (diff)
downloadcpython-450ae573bcf3b8b9e910dacf5dcf640cced44b97.zip
cpython-450ae573bcf3b8b9e910dacf5dcf640cced44b97.tar.gz
cpython-450ae573bcf3b8b9e910dacf5dcf640cced44b97.tar.bz2
Make pickling of OrderedDict instances more efficient.
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r--Lib/test/test_collections.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 1c49876..b108f95 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -795,9 +795,9 @@ class TestOrderedDict(unittest.TestCase):
# do not save instance dictionary if not needed
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
od = OrderedDict(pairs)
- self.assertEqual(len(od.__reduce__()), 2)
od.x = 10
- self.assertEqual(len(od.__reduce__()), 3)
+ self.assertGreaterEqual(len(od.__reduce__()), 2)
+ self.assertLessEqual(len(od.__reduce__()), 5)
def test_repr(self):
od = OrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)])