summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-07-06 15:16:04 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-07-06 15:16:04 (GMT)
commit2a99d5df63395149ef7393ef5e8a4fb141f64b55 (patch)
tree92e5ee63defe15d2cc6aca24b1232e04666e0326 /Lib/test/test_email
parent5f3fef37f629f9e98f5e83558795ab31d73e437a (diff)
downloadcpython-2a99d5df63395149ef7393ef5e8a4fb141f64b55.zip
cpython-2a99d5df63395149ef7393ef5e8a4fb141f64b55.tar.gz
cpython-2a99d5df63395149ef7393ef5e8a4fb141f64b55.tar.bz2
#18380: pass regex flags to the right argument. Patch by Valentina Mukhamedzhanova.
Diffstat (limited to 'Lib/test/test_email')
-rw-r--r--Lib/test/test_email/test_email.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index 78b86b8..8757924 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -4048,6 +4048,10 @@ class TestQuopri(unittest.TestCase):
def test_header_decode_non_ascii(self):
self._test_header_decode('hello=C7there', 'hello\xc7there')
+ def test_header_decode_re_bug_18380(self):
+ # Issue 18380: Call re.sub with a positional argument for flags in the wrong position
+ self.assertEqual(quoprimime.header_decode('=30' * 257), '0' * 257)
+
def _test_decode(self, encoded, expected_decoded, eol=None):
if eol is None:
decoded = quoprimime.decode(encoded)