summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email
diff options
context:
space:
mode:
authormircea-cosbuc <mircea-cosbuc@users.noreply.github.com>2017-06-12 06:43:41 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2017-06-12 06:43:41 (GMT)
commitb459f7482612d340b88b62edc024628595ec6337 (patch)
tree8a1a2804b922adc48302acb7b720cc69135f0c71 /Lib/test/test_email
parent3fd54d4a7e604067e2bc0f8cfd58bdbdc09fa7f4 (diff)
downloadcpython-b459f7482612d340b88b62edc024628595ec6337.zip
cpython-b459f7482612d340b88b62edc024628595ec6337.tar.gz
cpython-b459f7482612d340b88b62edc024628595ec6337.tar.bz2
[email] bpo-29478: Fix passing max_line_length=None from Compat32 policy (GH-595)
If max_line_length=None is specified while using the Compat32 policy, it is no longer ignored.
Diffstat (limited to 'Lib/test/test_email')
-rw-r--r--Lib/test/test_email/test_generator.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_generator.py b/Lib/test/test_email/test_generator.py
index 7c8877f..c4f1829 100644
--- a/Lib/test/test_email/test_generator.py
+++ b/Lib/test/test_email/test_generator.py
@@ -162,6 +162,13 @@ class TestGeneratorBase:
g.flatten(msg)
self.assertEqual(s.getvalue(), self.typ(expected))
+ def test_compat32_max_line_length_does_not_fold_when_none(self):
+ msg = self.msgmaker(self.typ(self.refold_long_expected[0]))
+ s = self.ioclass()
+ g = self.genclass(s, policy=policy.compat32.clone(max_line_length=None))
+ g.flatten(msg)
+ self.assertEqual(s.getvalue(), self.typ(self.refold_long_expected[0]))
+
class TestGenerator(TestGeneratorBase, TestEmailBase):