From 6eea8184235cb83807dd96c32ee78eddc83a9dc9 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Sun, 14 Apr 2013 00:56:39 -0700 Subject: [PATCH] Fix pickling test in test_memoryio. The test was closing the orginal object instead the copy. This didn't result in visible failures because the loop range was incorrect as well. --- Lib/test/test_memoryio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py index e5db94566fa..d611a3138b2 100644 --- a/Lib/test/test_memoryio.py +++ b/Lib/test/test_memoryio.py @@ -379,8 +379,8 @@ class MemoryTestMixin: self.assertEqual(obj.__class__, obj2.__class__) self.assertEqual(obj.foo, obj2.foo) self.assertEqual(obj.tell(), obj2.tell()) - obj.close() - self.assertRaises(ValueError, pickle.dumps, obj, proto) + obj2.close() + self.assertRaises(ValueError, pickle.dumps, obj2, proto) del __main__.PickleTestMemIO