diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-07-27 21:20:15 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-07-27 21:20:15 (GMT) |
commit | f1046ca8173380e2c320c56e1cdc911493371057 (patch) | |
tree | c3eabb51cc16a958e1fd1ca6700036d8b365d48b /Lib/test/test_struct.py | |
parent | 4bf70686fab91dcc5603c11c36f77bd2131ff6ed (diff) | |
download | cpython-f1046ca8173380e2c320c56e1cdc911493371057.zip cpython-f1046ca8173380e2c320c56e1cdc911493371057.tar.gz cpython-f1046ca8173380e2c320c56e1cdc911493371057.tar.bz2 |
Issue #4770: Restrict binascii module to accept only bytes (as specified).
And fix the email package to encode to ASCII instead of ``raw-unicode-escape`` before ASCII-to-binary decoding.
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r-- | Lib/test/test_struct.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index b923f45..6ca35ca 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -213,6 +213,7 @@ class StructTest(unittest.TestCase): expected = '%x' % expected if len(expected) & 1: expected = "0" + expected + expected = expected.encode('ascii') expected = unhexlify(expected) expected = (b"\x00" * (self.bytesize - len(expected)) + expected) |