Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 88f416e

Browse files
committed
Apparently, skipUnless() doesn't prevent the execution of
setUp() under 3.1.
1 parent 9e719b6 commit 88f416e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/test/test_zlib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ def test_same_as_binascii_crc32(self):
6666
# Issue #10276 - check that inputs >=4GB are handled correctly.
6767
class ChecksumBigBufferTestCase(unittest.TestCase):
6868

69+
@unittest.skipUnless(mmap, "mmap() is not available.")
70+
@unittest.skipUnless(sys.maxsize > _4G, "Can't run on a 32-bit system.")
71+
@unittest.skipUnless(support.is_resource_enabled("largefile"),
72+
"May use lots of disk space.")
6973
def setUp(self):
7074
with open(support.TESTFN, "wb+") as f:
7175
f.seek(_4G)
@@ -77,10 +81,6 @@ def tearDown(self):
7781
self.mapping.close()
7882
support.unlink(support.TESTFN)
7983

80-
@unittest.skipUnless(mmap, "mmap() is not available.")
81-
@unittest.skipUnless(sys.maxsize > _4G, "Can't run on a 32-bit system.")
82-
@unittest.skipUnless(support.is_resource_enabled("largefile"),
83-
"May use lots of disk space.")
8484
def test_big_buffer(self):
8585
self.assertEqual(zlib.crc32(self.mapping), 3058686908)
8686
self.assertEqual(zlib.adler32(self.mapping), 82837919)

0 commit comments

Comments
 (0)