We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92a5fff commit d3ca57fCopy full SHA for d3ca57f
Lib/test/test_buffer.py
@@ -4466,8 +4466,8 @@ def test_bytearray_alignment(self):
4466
@unittest.skipIf(_testcapi is None, "requires _testcapi")
4467
def test_array_alignment(self):
4468
# gh-140557: pointer alignment of buffers including empty allocation
4469
- # should be at least to `size_t`.
4470
- align = struct.calcsize("N")
+ # should match the maximum array alignment.
+ align = max(struct.calcsize(fmt) for fmt in ARRAY)
4471
cases = [array.array(fmt) for fmt in ARRAY]
4472
# Empty arrays
4473
self.assertEqual(
0 commit comments