Issue #15406: Fix deprecation warning in ctypes test_bitfields.py

Patch by Flávio Ribeiro.
This commit is contained in:
Meador Inge 2012-07-20 12:52:42 -05:00
commit b17ad53e39
2 changed files with 5 additions and 4 deletions

View File

@ -246,9 +246,9 @@ class BitFieldTest(unittest.TestCase):
_fields_ = [("a", c_uint32, 32)]
x = X()
x.a = 10
self.assertEquals(x.a, 10)
self.assertEqual(x.a, 10)
x.a = 0xFDCBA987
self.assertEquals(x.a, 0xFDCBA987)
self.assertEqual(x.a, 0xFDCBA987)
@unittest.skipUnless(hasattr(ctypes, "c_uint64"), "c_int64 is required")
def test_uint64(self):
@ -256,9 +256,9 @@ class BitFieldTest(unittest.TestCase):
_fields_ = [("a", c_uint64, 64)]
x = X()
x.a = 10
self.assertEquals(x.a, 10)
self.assertEqual(x.a, 10)
x.a = 0xFEDCBA9876543211
self.assertEquals(x.a, 0xFEDCBA9876543211)
self.assertEqual(x.a, 0xFEDCBA9876543211)
if __name__ == "__main__":
unittest.main()

View File

@ -866,6 +866,7 @@ Bernhard Reiter
Steven Reiz
Roeland Rengelink
Antoine Reversat
Flávio Ribeiro
Francesco Ricciardi
Tim Rice
Jan Pieter Riegel