summaryrefslogtreecommitdiffstats
path: root/Lib/ctypes/test
diff options
context:
space:
mode:
authorFilipe LaĆ­ns <lains@archlinux.org>2021-07-11 16:43:50 (GMT)
committerGitHub <noreply@github.com>2021-07-11 16:43:50 (GMT)
commite14d5ae5447ae28fc4828a9cee8e9007f9c30700 (patch)
tree8973d29f165b2c3f142c1e73520a5cb8d5c0f4db /Lib/ctypes/test
parent248173cc0483a9ad9261353302f1234cf9eb2ebe (diff)
downloadcpython-e14d5ae5447ae28fc4828a9cee8e9007f9c30700.zip
cpython-e14d5ae5447ae28fc4828a9cee8e9007f9c30700.tar.gz
cpython-e14d5ae5447ae28fc4828a9cee8e9007f9c30700.tar.bz2
bpo-29753: revert 0d7ad9f (GH-19850) (GH-27085)
This reverts commit 0d7ad9fb38c041c46094087b0cf2c8ce44916b11 as it has a regression. See https://github.com/python/cpython/pull/19850#issuecomment-869410686
Diffstat (limited to 'Lib/ctypes/test')
-rw-r--r--Lib/ctypes/test/test_bitfields.py63
1 files changed, 0 insertions, 63 deletions
diff --git a/Lib/ctypes/test/test_bitfields.py b/Lib/ctypes/test/test_bitfields.py
index 68b618a..992b8c4 100644
--- a/Lib/ctypes/test/test_bitfields.py
+++ b/Lib/ctypes/test/test_bitfields.py
@@ -233,69 +233,6 @@ class BitFieldTest(unittest.TestCase):
else:
self.assertEqual(sizeof(X), sizeof(c_int) * 2)
- @unittest.skipIf(os.name == 'nt', reason='Posix only')
- def test_packed_posix(self):
- test_cases = {
- (
- ("a", c_uint8, 4),
- ("b", c_uint8, 4),
- ): 1,
- (
- ("a", c_uint8, 1),
- ("b", c_uint16, 1),
- ("c", c_uint32, 1),
- ("d", c_uint64, 1),
- ): 1,
- (
- ("a", c_uint8, 8),
- ("b", c_uint16, 1),
- ("c", c_uint32, 1),
- ("d", c_uint64, 1),
- ): 2,
- (
- ("a", c_uint32, 9),
- ("b", c_uint16, 10),
- ("c", c_uint32, 25),
- ("d", c_uint64, 1),
- ): 6,
- (
- ("a", c_uint32, 9),
- ("b", c_uint16, 10),
- ("c", c_uint32, 25),
- ("d", c_uint64, 5),
- ): 7,
- (
- ("a", c_uint16),
- ("b", c_uint16, 9),
- ("c", c_uint16, 1),
- ("d", c_uint16, 1),
- ("e", c_uint16, 1),
- ("f", c_uint16, 1),
- ("g", c_uint16, 3),
- ("h", c_uint32, 10),
- ("i", c_uint32, 20),
- ("j", c_uint32, 2),
- ): 8,
- (
- ("a", c_uint16, 9),
- ("b", c_uint16, 10),
- ("d", c_uint16),
- ("c", c_uint8, 8),
- ): 6,
- (
- ("a", c_uint32, 9),
- ("b", c_uint32),
- ("c", c_uint32, 8),
- ): 7,
- }
-
- for fields, size in test_cases.items():
- with self.subTest(fields=fields):
- class X(Structure):
- _pack_ = 1
- _fields_ = list(fields)
- self.assertEqual(sizeof(X), size)
-
def test_anon_bitfields(self):
# anonymous bit-fields gave a strange error message
class X(Structure):