Issue #10276: Fix test_zlib, m may be undefined in the finally block
This commit is contained in:
parent
f9fb43492c
commit
e4163e2c8d
|
@ -88,8 +88,8 @@ class ChecksumBigBufferTestCase(unittest.TestCase):
|
||||||
f.seek(self.int_max-4)
|
f.seek(self.int_max-4)
|
||||||
f.write("asdf")
|
f.write("asdf")
|
||||||
f.flush()
|
f.flush()
|
||||||
try:
|
|
||||||
m = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
|
m = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
|
||||||
|
try:
|
||||||
self.assertEqual(zlib.crc32(m), 0x709418e7)
|
self.assertEqual(zlib.crc32(m), 0x709418e7)
|
||||||
self.assertEqual(zlib.adler32(m), -2072837729)
|
self.assertEqual(zlib.adler32(m), -2072837729)
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue