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.
This commit is contained in:
Alexandre Vassalotti 2013-04-14 00:56:39 -07:00
parent 9a7a81195c
commit 6eea818423

View File

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