Add skipping to struct test that only applies when overflow masking is in effect

This commit is contained in:
Mark Dickinson 2009-07-07 11:08:23 +00:00
parent 24766ba6af
commit ca6b5f36f4
1 changed files with 2 additions and 0 deletions

View File

@ -465,6 +465,8 @@ class StructTest(unittest.TestCase):
self.check_float_coerce(endian + fmt, 1.0)
self.check_float_coerce(endian + fmt, 1.5)
@unittest.skipUnless(PY_STRUCT_OVERFLOW_MASKING,
"only applies when overflow masking enabled")
def test_issue4228(self):
# Packing a long may yield either 32 or 64 bits
x = struct.pack('L', -1)[:4]