Esempio n. 1
0
 def test_05_xx(self):
     l_str = 'Comment\n'
     l_str = debug_tools._nuke_newlines(l_str)
     l_maxlen = 50
     l_ret = debug_tools._format_line(l_str, l_maxlen)
     print('\nC1-05-A Long 50: ', l_ret)
     self.assertEqual(len(l_ret), 1)
Esempio n. 2
0
 def test_02_Long(self):
     """Testing _nuke_newlines().
     """
     l_max = 50
     l_ret = debug_tools._nuke_newlines(LOTS_NLS)
     # print('B2-02-A Long: ', l_ret)
     self.assertLess(len(l_ret), l_max + 1)
Esempio n. 3
0
 def test_02_Short_50(self):
     l_str = debug_tools._nuke_newlines(self.m_short)
     l_maxlen = 50
     l_ret = debug_tools._format_line(l_str, l_maxlen)
     # print('\nC1-02-A - Short 50: ', l_ret)
     self.assertEqual(len(l_ret), int(
         (len(l_str) + l_maxlen - 1) / l_maxlen))
Esempio n. 4
0
 def test_02_Long(self):
     """Testing _nuke_newlines().
     """
     l_max = 50
     l_ret = debug_tools._nuke_newlines(LOTS_NLS)
     # print('B2-02-A Long: ', l_ret)
     # print('-----')
     self.assertLess(len(l_ret), l_max + 1)
Esempio n. 5
0
 def test_03_Empty_1(self):
     """Testing _nuke_newlines().
     """
     l_max = 30
     l_short = 'This\n\n\n\n'
     l_ret = debug_tools._nuke_newlines(l_short)
     print('B2-03-A Empty_1:>>{}<<'.format(l_ret))
     self.assertLess(len(l_ret), l_max + 1)
Esempio n. 6
0
 def test_01_Short(self):
     """Testing _nuke_newlines().
     """
     l_max = 30
     l_short = 'This\nis\nshort.'
     l_ret = debug_tools._nuke_newlines(l_short)
     # print('B2-01-A Short: ', l_ret)
     self.assertLess(len(l_ret), l_max + 1)
Esempio n. 7
0
 def test_01_Short(self):
     """Testing _nuke_newlines().
     """
     l_max = 30
     l_short = 'This\nis\nshort.'
     l_ret = debug_tools._nuke_newlines(l_short)
     # print('B2-01-A Short: ', l_ret)
     # print('-----')
     self.assertLess(len(l_ret), l_max + 1)
Esempio n. 8
0
 def test_04_Long_50(self):
     l_str = debug_tools._nuke_newlines(self.m_long)
     l_maxlen = 50
     l_ret = debug_tools._format_line(l_str, l_maxlen)
     # print('\nC1-04-A Long 50: ', l_ret)
     self.assertEqual(len(l_ret), 9)
Esempio n. 9
0
 def test_03_Long_10(self):
     l_str = debug_tools._nuke_newlines(self.m_long)
     l_maxlen = 10
     l_ret = debug_tools._format_line(l_str, l_maxlen)
     print('\nC1-03-A Long 10: ', l_ret)
     self.assertEqual(len(l_ret), 27)
Esempio n. 10
0
 def test_01_Short_10(self):
     l_str = debug_tools._nuke_newlines(self.m_short)
     l_maxlen = 10
     l_ret = debug_tools._format_line(l_str, l_maxlen)
     # print('\nC1-01-A Short Split: ', l_ret)
     self.assertEqual(len(l_ret), 2)
Esempio n. 11
0
 def test_04_Long_50(self):
     l_str = debug_tools._nuke_newlines(self.m_long)
     l_maxlen = 50
     l_ret = debug_tools._format_line(l_str, l_maxlen)
     # print('\nC1-04-A Long 50: ', l_ret)
     self.assertEqual(len(l_ret), 9)
Esempio n. 12
0
 def test_03_Long_10(self):
     l_str = debug_tools._nuke_newlines(self.m_long)
     l_maxlen = 10
     l_ret = debug_tools._format_line(l_str, l_maxlen)
     # print('\nC1-03-A Long 10: ', l_ret)
     self.assertEqual(len(l_ret), 27)
Esempio n. 13
0
 def test_02_Short_50(self):
     l_str = debug_tools._nuke_newlines(self.m_short)
     l_maxlen = 50
     l_ret = debug_tools._format_line(l_str, l_maxlen)
     # print('\nC1-02-A - Short 50: ', l_ret)
     self.assertEqual(len(l_ret), int((len(l_str) + l_maxlen - 1) / l_maxlen))
Esempio n. 14
0
 def test_01_Short_10(self):
     l_str = debug_tools._nuke_newlines(self.m_short)
     l_maxlen = 10
     l_ret = debug_tools._format_line(l_str, l_maxlen)
     # print('\nC1-01-A Short Split: ', l_ret)
     self.assertEqual(len(l_ret), 2)