diff options
| author | Jonathan Eunice <jonathan.eunice@gmail.com> | 2017-06-13 19:04:10 (GMT) |
|---|---|---|
| committer | Mariatta <Mariatta@users.noreply.github.com> | 2017-06-13 19:04:10 (GMT) |
| commit | 601483d3b8a0433ca25f7fd6beea2cef674be039 (patch) | |
| tree | 88c26335699ad6504e4766100999769c4f1f28dc /Lib/test | |
| parent | 049cf2bb44038351e1b2eed4fc7b1b522329e550 (diff) | |
| download | cpython-601483d3b8a0433ca25f7fd6beea2cef674be039.zip cpython-601483d3b8a0433ca25f7fd6beea2cef674be039.tar.gz cpython-601483d3b8a0433ca25f7fd6beea2cef674be039.tar.bz2 | |
bpo-30603: Add test case to textwrap.dedent (GH-2014)
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_textwrap.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_textwrap.py b/Lib/test/test_textwrap.py index 47d97bd..fe15348 100644 --- a/Lib/test/test_textwrap.py +++ b/Lib/test/test_textwrap.py @@ -754,6 +754,11 @@ def foo(): expect = "Foo\n Bar\n\n Baz\n" self.assertEqual(expect, dedent(text)) + # Uneven indentation with declining indent level. + text = " Foo\n Bar\n" # 5 spaces, then 4 + expect = " Foo\nBar\n" + self.assertEqual(expect, dedent(text)) + # dedent() should not mangle internal tabs def test_dedent_preserve_internal_tabs(self): text = " hello\tthere\n how are\tyou?" |
