Skip to content

Commit 3679fe1

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 3679fe1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

mypyc/test-data/run-base64.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ 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+
# Python 3.14 tightened stdlib base64.b64decode to raise on trailing data
134+
# after padding, while our native implementation still accepts it. Skip
135+
# the stdlib equivalence check on 3.14+ rather than diverging from CPython.
136+
import sys
137+
if sys.version_info >= (3, 14):
138+
return
133139
check_decode(b"=", encoded=True)
134140
check_decode(b"==", encoded=True)
135141
check_decode(b"===", encoded=True)

0 commit comments

Comments
 (0)