Ticket #1601: 1601v4.patch

File 1601v4.patch, 1.3 KB (added by Stephen Solis, 9 years ago)

Applied more review suggestions

  • twisted/test/test_usage.py

     
    347347        self.failUnlessIdentical(oBar.subOptions.parent, oBar)
    348348
    349349
    350 class GetUsageOptions(usage.Options):
    351     longdesc = ("\nA test documentation string.\n"
    352                 "This line has more than 80 characters-"
    353                 "PADDINGXXPADDINGXXPADDINGXXPADDINGXXPADDINGXXPADDINGXX\n")
    354 
    355 
    356350class HelpStringTest(unittest.TestCase):
    357351    def setUp(self):
    358352        """
     
    386380
    387381    def test_longdescNotWrapped(self):
    388382        """
    389         getUsage does not wrap lines in longdesc.
     383        L{usage.Options.getUsage} does not wrap lines in C{longdesc}.
    390384        """
    391         opt = GetUsageOptions()
    392         opt.getUsage(width=80)
    393         self.assertTrue(len(opt.longdesc.splitlines()[2]) > 80)
     385        self.nice.longdesc = ("\nA test documentation string.\n"
     386                    "This line has more than 80 characters-"
     387                    "PADDINGXXPADDINGXXPADDINGXXPADDINGXXPADDINGXXPADDING\n")
     388        self.nice.getUsage(width=80)
     389        self.assertTrue(len(self.nice.longdesc.splitlines()[2]) > 80)
    394390
    395391
    396392class PortCoerceTestCase(unittest.TestCase):