Exemplo n.º 1
0
 def testWordWrap4 (self):
     ''' Simple break at the end of 'One' '''
     rows = 5
     cols = 4
     
     test = []
     test.append ("Testing One 0123456789");
             
     self.assertEqual(["Test", "ing ", "One ", "0123", "4567"], Formatting.wordWrap (test, rows, cols))
Exemplo n.º 2
0
 def testWordWrap3 (self):
     ''' Simple break at the end of 'One' '''
     rows = 1
     cols = 11
     
     test = []
     test.append ("Testing One Two Three");
             
     self.assertEqual(["Testing One"], Formatting.wordWrap (test, rows, cols))
Exemplo n.º 3
0
 def testWordWrap1 (self):
     test = []
     test.append ("Testing One Two Three");
     
     self.assertEqual(["Testing One Two Three"], Formatting.wordWrap (test, 1, 80))
Exemplo n.º 4
0
 def format (self):
     self.displayedLines = Formatting.wordWrap (self.text, self.width, self.height)