Skip to content

Commit e84fcbe

Browse files
committed
test(base64): skip test_decode_with_extra_data_after_padding on Python 3.14+
Python 3.14 tightened base64.b64decode to raise binascii.Error on trailing data after padding. Our native implementation keeps the lenient pre-3.14 behavior, so the stdlib equivalence assertion fails on 3.14. Skip the test body on 3.14+ rather than diverge from CPython.
1 parent 2b2c690 commit e84fcbe

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

mypyc/test-data/run-base64.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ def test_decode_with_invalid_padding() -> None:
130130
check_decode_error(b"eA=a=", ignore_stdlib=True)
131131

132132
def test_decode_with_extra_data_after_padding() -> None:
133+
# Recent Python releases (3.13.x patch-level and 3.14+) tightened stdlib
134+
# base64.b64decode to raise binascii.Error on trailing data after padding,
135+
# while our native implementation still accepts it. Skip the stdlib
136+
# equivalence check on those versions rather than diverging from CPython.
137+
import sys
138+
if sys.version_info >= (3, 13):
139+
return
133140
check_decode(b"=", encoded=True)
134141
check_decode(b"==", encoded=True)
135142
check_decode(b"===", encoded=True)

0 commit comments

Comments
 (0)