Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 212cf13

Browse files
Fix test for Windows
1 parent 456afd0 commit 212cf13

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_ctypes/test_bitfields.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,10 @@ class X(Structure):
381381
("b", c_uint8, 8),
382382
("c", c_uint32, 16)
383383
]
384-
self.assertEqual(4, sizeof(X))
384+
if sys.platform == 'win32':
385+
self.assertEqual(8, sizeof(X))
386+
else:
387+
self.assertEqual(4, sizeof(X))
385388

386389
def test_anon_bitfields(self):
387390
# anonymous bit-fields gave a strange error message

0 commit comments

Comments
 (0)