File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -209,12 +209,14 @@ def test_exit(self):
209
209
# gh-125842: Windows uses 32-bit unsigned integers for exit codes
210
210
# so a -1 exit code is sometimes interpreted as 0xffff_ffff.
211
211
rc , out , err = assert_python_failure ('-c' , 'import sys; sys.exit(0xffff_ffff)' )
212
- self .assertIn (rc , (- 1 , 255 , 0xffff_ffff ))
212
+ self .assertIn (rc , (- 1 , 0xff , 0xffff_ffff ))
213
213
self .assertEqual (out , b'' )
214
214
self .assertEqual (err , b'' )
215
215
216
+ # Overflow results in a -1 exit code, which may be converted to 0xff
217
+ # or 0xffff_ffff.
216
218
rc , out , err = assert_python_failure ('-c' , 'import sys; sys.exit(2**128)' )
217
- self .assertIn (rc , (- 1 , 255 ))
219
+ self .assertIn (rc , (- 1 , 0xff , 0xffff_ffff ))
218
220
self .assertEqual (out , b'' )
219
221
self .assertEqual (err , b'' )
220
222
You can’t perform that action at this time.
0 commit comments