From e173c075026aea8a9d023997701a7461fb7e0272 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 11 Apr 2015 17:44:01 -0400 Subject: Unittest for Issue 21511 by Christie Wilson bobcatfish@gmail.com. --- Lib/test/test_quopri.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/test/test_quopri.py b/Lib/test/test_quopri.py index 583fd45..92511fa 100644 --- a/Lib/test/test_quopri.py +++ b/Lib/test/test_quopri.py @@ -138,6 +138,13 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz''') self.assertEqual(quopri.decodestring(e), p) @withpythonimplementation + def test_decodestring_double_equals(self): + # Issue 21511 - Ensure that byte string is compared to byte string + # instead of int byte value + decoded_value, encoded_value = (b"123=four", b"123==four") + self.assertEqual(quopri.decodestring(encoded_value), decoded_value) + + @withpythonimplementation def test_idempotent_string(self): for p, e in self.STRINGS: self.assertEqual(quopri.decodestring(quopri.encodestring(e)), e) -- cgit v0.12