projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
049cf2b
)
bpo-30603: Add test case to textwrap.dedent (GH-2014)
author
Jonathan Eunice
<jonathan.eunice@gmail.com>
Tue, 13 Jun 2017 19:04:10 +0000
(15:04 -0400)
committer
Mariatta
<Mariatta@users.noreply.github.com>
Tue, 13 Jun 2017 19:04:10 +0000
(12:04 -0700)
Lib/test/test_textwrap.py
patch
|
blob
|
history
diff --git
a/Lib/test/test_textwrap.py
b/Lib/test/test_textwrap.py
index 47d97bda86fd1fabf3202b9ee202ef1895b12e93..fe15348aff114bd2ae839cda1cedc217967e435b 100644
(file)
--- 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?"