diff -r a5530207b003 Lib/test/test_quopri.py --- a/Lib/test/test_quopri.py Sat Apr 11 09:39:59 2015 -0700 +++ b/Lib/test/test_quopri.py Sat Apr 11 17:33:29 2015 -0400 @@ -138,6 +138,13 @@ 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)