Exemple #1
0
 def test_justify(self):
     res = list(b.justify([['foo', 'bar'], ['a', 'b', 'c']], 8))
     self.assertEqual(res, [['foo ', 'bar'], ['a  ', 'b ', 'c']])
Exemple #2
0
 def test_justify_two_empty_lines(self):
     res = list(b.justify([[], []], 100))
     self.assertEqual(res, [[], []])
Exemple #3
0
 def test_justify_one_word_per_line(self):
     res = list(b.justify([['foo'], ['bar']], 8))
     self.assertEqual(res, [['foo'], ['bar']])
Exemple #4
0
 def test_justify_empty_no_width(self):
     res = list(b.justify([[]], 0))
     self.assertEqual(res, [[]])
Exemple #5
0
 def test_justify_empty(self):
     res = list(b.justify([[]], 100))
     self.assertEqual(res, [[]])
Exemple #6
0
 def test_justify(self):
     res = list(b.justify([['foo', 'bar'], ['a', 'b', 'c']], 8))
     self.assertEqual(res, [['foo ', 'bar'], ['a  ', 'b ', 'c']])
Exemple #7
0
 def test_justify_one_word_per_line(self):
     res = list(b.justify([['foo'], ['bar']], 8))
     self.assertEqual(res, [['foo'], ['bar']])
Exemple #8
0
 def test_justify_two_empty_lines(self):
     res = list(b.justify([[], []], 100))
     self.assertEqual(res, [[], []])
Exemple #9
0
 def test_justify_empty(self):
     res = list(b.justify([[]], 100))
     self.assertEqual(res, [[]])
Exemple #10
0
 def test_justify_empty_no_width(self):
     res = list(b.justify([[]], 0))
     self.assertEqual(res, [[]])