From: Alexandre Vassalotti <alexandre@peadrop.com>
Date: Sun, 14 Apr 2013 07:56:39 +0000 (-0700)
Subject: Fix pickling test in test_memoryio.
X-Git-Tag: v3.3.2~118
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eea8184235cb83807dd96c32ee78eddc83a9dc9;p=python

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.
---

diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py
index e5db94566f..d611a3138b 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