From 83800a657863575387f04dcfee36b53f6af1a310 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 29 Aug 2007 02:57:31 +0000 Subject: [PATCH] Fix this test. How could it ever have worked?! --- Lib/test/test_shelve.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_shelve.py b/Lib/test/test_shelve.py index f8fcda9754d..e5d19f5c85e 100644 --- a/Lib/test/test_shelve.py +++ b/Lib/test/test_shelve.py @@ -25,7 +25,7 @@ def __delitem__(self, key): def iterkeys(self): for k in self.d.keys(): - yield k.decode("latin-1") + yield k.encode("latin-1") def keys(self): return list(self.iterkeys()) @@ -79,7 +79,8 @@ def test_in_memory_shelf(self): s.close() self.assertEqual(len(d1), 1) - self.assertNotEqual(d1, d2) + self.assertEqual(len(d2), 1) + self.assertNotEqual(d1.items(), d2.items()) def test_mutable_entry(self): d1 = byteskeydict()