Skip to content

Commit d3ca57f

Browse files
committed
Require max observable alignment in array test
1 parent 92a5fff commit d3ca57f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_buffer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4466,8 +4466,8 @@ def test_bytearray_alignment(self):
44664466
@unittest.skipIf(_testcapi is None, "requires _testcapi")
44674467
def test_array_alignment(self):
44684468
# gh-140557: pointer alignment of buffers including empty allocation
4469-
# should be at least to `size_t`.
4470-
align = struct.calcsize("N")
4469+
# should match the maximum array alignment.
4470+
align = max(struct.calcsize(fmt) for fmt in ARRAY)
44714471
cases = [array.array(fmt) for fmt in ARRAY]
44724472
# Empty arrays
44734473
self.assertEqual(

0 commit comments

Comments
 (0)