File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ def native_type_range(fmt):
143143# Format codes supported by array.array
144144ARRAY = NATIVE .copy ()
145145for k in NATIVE :
146- if not k in "bBhHiIlLfd" :
146+ if k not in list ( "bBhHiIlLefd" ) + [ 'Zf' , 'Zd' ] :
147147 del ARRAY [k ]
148148
149149BYTEFMT = NATIVE .copy ()
@@ -4495,8 +4495,10 @@ def test_bytearray_alignment(self):
44954495 def test_array_alignment (self ):
44964496 # gh-140557: pointer alignment of buffers including empty allocation
44974497 # should match the maximum array alignment.
4498- align = max (struct .calcsize (fmt ) for fmt in ARRAY )
4499- cases = [array .array (fmt ) for fmt in ARRAY ]
4498+ formats = [fmt for fmt in ARRAY
4499+ if struct .calcsize (fmt ) <= struct .calcsize ('P' )]
4500+ align = max (struct .calcsize (fmt ) for fmt in formats )
4501+ cases = [array .array (fmt ) for fmt in formats ]
45004502 # Empty arrays
45014503 self .assertEqual (
45024504 [_testcapi .buffer_pointer_as_int (case ) % align for case in cases ],
You can’t perform that action at this time.
0 commit comments