Exemplo n.º 1
0
 def test_modified_uid_huge(self):
     huge_uid = UID(1)
     huge_uid.data = 2**64  # dodge the size check in the constructor
     with self.assertRaises(OverflowError):
         plistlib.dumps(huge_uid, fmt=plistlib.FMT_BINARY)
Exemplo n.º 2
0
 def test_modified_uid_negative(self):
     neg_uid = UID(1)
     neg_uid.data = -1  # dodge the negative check in the constructor
     with self.assertRaises(ValueError):
         plistlib.dumps(neg_uid, fmt=plistlib.FMT_BINARY)