New submission from Andrei Kulakov <andrei....@gmail.com>:

RFC 4648 [1] has added a list of encoding test cases -- see section 10 of the 
RFC. It might be nice to add a test function that is a direct copy of these 
test cases. This will make conformance to this RFC clearer (actually right now 
we don't state conformance with 4648 in the docs except for b32 hex 
encode/decode, but I'm planning to update the docs in a separate issue).

This will also let us easily keep test cases in sync with future updates in the 
RFC.

The tests are similar to what we already have except our test cases go from '' 
=> 'abc', and their test cases from '' => 'foobar' (by adding a character at a 
time in succession). [also some of our test cases go from '' to 'abcde', so a 
bit inconsistent.]

I've confirmed that all of their test cases pass with Python dev branch code.

I can put up a PR if this sounds good.




[1] https://datatracker.ietf.org/doc/html/rfc4648.html

----------
components: Library (Lib)
messages: 399276
nosy: andrei.avk
priority: normal
severity: normal
status: open
title: base64 RFC4648 test cases
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44873>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to