ยปCore Development>Code coverage>Lib/ctypes/test/test_sizes.py

Python code coverage for Lib/ctypes/test/test_sizes.py

#countcontent
1n/a# Test specifically-sized containers.
2n/a
3n/afrom ctypes import *
4n/a
5n/aimport unittest
6n/a
7n/a
8n/aclass SizesTestCase(unittest.TestCase):
9n/a def test_8(self):
10n/a self.assertEqual(1, sizeof(c_int8))
11n/a self.assertEqual(1, sizeof(c_uint8))
12n/a
13n/a def test_16(self):
14n/a self.assertEqual(2, sizeof(c_int16))
15n/a self.assertEqual(2, sizeof(c_uint16))
16n/a
17n/a def test_32(self):
18n/a self.assertEqual(4, sizeof(c_int32))
19n/a self.assertEqual(4, sizeof(c_uint32))
20n/a
21n/a def test_64(self):
22n/a self.assertEqual(8, sizeof(c_int64))
23n/a self.assertEqual(8, sizeof(c_uint64))
24n/a
25n/a def test_size_t(self):
26n/a self.assertEqual(sizeof(c_void_p), sizeof(c_size_t))
27n/a
28n/a def test_ssize_t(self):
29n/a self.assertEqual(sizeof(c_void_p), sizeof(c_ssize_t))
30n/a
31n/a
32n/aif __name__ == "__main__":
33n/a unittest.main()