mirror of
https://github.com/python/cpython.git
synced 2024-12-13 11:54:54 +08:00
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:
parent
9a7a81195c
commit
6eea818423
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user