From 24a1c9cff5025c6006d639a787ac789809380032 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Thu, 22 Aug 2002 21:12:54 +0000 Subject: [PATCH] Test _split() method in test_unix_options(). --- Lib/test/test_textwrap.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/test/test_textwrap.py b/Lib/test/test_textwrap.py index d6bd47c31b..838596d78f 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 -- 2.50.0