Пример #1
0
	def test_wordWidth8CutEqualToTrue(self):
		word = wordwrap('hello goodbye', 8, '\n', True)

		self.assertEqual(word, 'hello go\nodbye')
Пример #2
0
	def test_wordWidth8BreakWithnewLine(self):
		word = wordwrap('hello goodbye', 8)

		self.assertEqual(word,'hello\ngoodbye')
Пример #3
0
	def test_wordWidth8BreakWithDollarSymbol(self):
		word = wordwrap('hello goodbye', 8, '$')
		
		self.assertEqual(word, 'hello$goodbye')
Пример #4
0
	def test_wordLengthLessThenCutWidth(self):

		self.assertEqual(wordwrap('hello'), 'hello')