summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_textwrap.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2002-08-22 21:12:54 (GMT)
committerGreg Ward <gward@python.net>2002-08-22 21:12:54 (GMT)
commit24a1c9cff5025c6006d639a787ac789809380032 (patch)
tree9a7a7e9cb688451f06000c9690c76f412aedb062 /Lib/test/test_textwrap.py
parent34f995b3c17102c65dac184d8bce4ccff81a04a4 (diff)
downloadcpython-24a1c9cff5025c6006d639a787ac789809380032.zip
cpython-24a1c9cff5025c6006d639a787ac789809380032.tar.gz
cpython-24a1c9cff5025c6006d639a787ac789809380032.tar.bz2
Test _split() method in test_unix_options().
Diffstat (limited to 'Lib/test/test_textwrap.py')
-rw-r--r--Lib/test/test_textwrap.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_textwrap.py b/Lib/test/test_textwrap.py
index d6bd47c..838596d 100644
--- a/Lib/test/test_textwrap.py
+++ b/Lib/test/test_textwrap.py
@@ -191,6 +191,15 @@ What a mess!
"in its long form."]
self.check_wrap(text, 42, expect)
+ # Again, all of the above can be deduced from _split().
+ text = "the -n option, or --dry-run or --dryrun"
+ result = self.wrapper._split(text)
+ expect = ["the", " ", "-n", " ", "option,", " ", "or", " ",
+ "--dry-", "run", " ", "or", " ", "--dryrun"]
+ self.assertEquals(result, expect,
+ "\nexpected %r\n"
+ "but got %r" % (expect, result))
+
def test_split(self):
# Ensure that the standard _split() method works as advertised
# in the comments