summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_memoryio.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2013-04-14 07:56:39 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2013-04-14 07:56:39 (GMT)
commit6eea8184235cb83807dd96c32ee78eddc83a9dc9 (patch)
tree3df2951d7d1627e600ec6b75afbc9becc9c0092a /Lib/test/test_memoryio.py
parent9a7a81195ce42efc92fac04c19a2fe9f0562ef51 (diff)
downloadcpython-6eea8184235cb83807dd96c32ee78eddc83a9dc9.zip
cpython-6eea8184235cb83807dd96c32ee78eddc83a9dc9.tar.gz
cpython-6eea8184235cb83807dd96c32ee78eddc83a9dc9.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_memoryio.py')
-rw-r--r--Lib/test/test_memoryio.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py
index e5db945..d611a31 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