mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
[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.
This commit is contained in:
parent
3fd54d4a7e
commit
b459f74826
4 changed files with 17 additions and 2 deletions
|
|
@ -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):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue