Example #1
0
 def test_fixed_width_file_name_with_none_filename_return_empty_string(
         self):
     test = cli.fixed_width_file_name(None, 25)
     expected = ''
     assert expected == test
Example #2
0
 def test_fixed_width_file_name_with_file_name_at_max_length_is_not_shortened(
         self):
     test = cli.fixed_width_file_name('01234567890123456789012.c', 25)
     expected = '01234567890123456789012.c'
     assert expected == test
Example #3
0
 def test_fixed_width_file_name_with_file_name_smaller_than_max_length_not_shortened(
         self):
     test = cli.fixed_width_file_name('0123456789012345678901.c', 25)
     expected = '0123456789012345678901.c'
     assert expected == test
Example #4
0
 def test_fixed_width_file_name_with_file_name_smaller_than_max_length_is_not_shortened(self):
     file_name = '0123456789012345678901234.c'
     test = cli.fixed_width_file_name(file_name, max_length=50)
     assert file_name == test
Example #5
0
 def test_fixed_width_file_name_with_file_name_smaller_than_max_length_is_not_shortened(
         self):
     file_name = '0123456789012345678901234.c'
     test = cli.fixed_width_file_name(file_name, max_length=50)
     assert file_name == test
Example #6
0
 def test_fixed_width_file_name_with_posix_path_with_shortening(self):
     test = cli.fixed_width_file_name(
         'C/Documents_and_Settings/Boki/Desktop/head/patches/drupal6/012345678901234567890123.c',
         25)
     expected = '0123456789...4567890123.c'
     assert expected == test
Example #7
0
 def test_fixed_width_file_name_with_win_path_with_shortening(self):
     test = cli.fixed_width_file_name(
         'C\\:Documents_and_Settings\\Boki\\Desktop\\head\\patches\\drupal6\\012345678901234567890123.c',
         25)
     expected = '0123456789...4567890123.c'
     assert expected == test
Example #8
0
 def test_fixed_width_file_name_with_posix_path_with_shortening(self):
     test = cli.fixed_width_file_name('C/Documents_and_Settings/Boki/Desktop/head/patches/drupal6/012345678901234567890123.c', 25)
     expected = '0123456789...4567890123.c'
     assert expected == test
Example #9
0
 def test_fixed_width_file_name_with_win_path_without_shortening(self):
     test = cli.fixed_width_file_name('C\\:Documents_and_Settings\\Boki\\Desktop\\head\\patches\\drupal6\\drupal.js', 25)
     expected = 'drupal.js'
     assert expected == test
Example #10
0
 def test_fixed_width_file_name_without_extension(self):
     test = cli.fixed_width_file_name('012345678901234567890123456', 25)
     expected = '01234567890...67890123456'
     assert expected == test
Example #11
0
 def test_fixed_width_file_name_with_posix_path_without_shortening(self):
     test = cli.fixed_width_file_name('C/Documents_and_Settings/Boki/Desktop/head/patches/drupal6/drupal.js', 25)
     expected = 'drupal.js'
     assert expected == test
Example #12
0
 def test_fixed_width_file_name_with_none_filename_return_empty_string(self):
     test = cli.fixed_width_file_name(None, 25)
     expected = ''
     assert expected == test
Example #13
0
 def test_fixed_width_file_name_with_file_name_smaller_than_max_length_not_shortened(self):
     test = cli.fixed_width_file_name('0123456789012345678901.c', 25)
     expected = '0123456789012345678901.c'
     assert expected == test
Example #14
0
 def test_fixed_width_file_name_with_file_name_at_max_length_is_not_shortened(self):
     test = cli.fixed_width_file_name('01234567890123456789012.c', 25)
     expected = '01234567890123456789012.c'
     assert expected == test
Example #15
0
 def test_fixed_width_file_name_without_extension(self):
     test = cli.fixed_width_file_name('012345678901234567890123456', 25)
     expected = '01234567890...67890123456'
     assert expected == test
Example #16
0
 def test_fixed_width_file_name_with_win_path_with_shortening(self):
     test = cli.fixed_width_file_name('C\\:Documents_and_Settings\\Boki\\Desktop\\head\\patches\\drupal6\\012345678901234567890123.c', 25)
     expected = '0123456789...4567890123.c'
     assert expected == test
Example #17
0
 def test_fixed_width_file_name_with_posix_path_without_shortening(self):
     test = cli.fixed_width_file_name(
         'C/Documents_and_Settings/Boki/Desktop/head/patches/drupal6/drupal.js',
         25)
     expected = 'drupal.js'
     assert expected == test
Example #18
0
 def test_fixed_width_file_name_with_very_small_file_name_and_long_extension(self):
     test = cli.fixed_width_file_name('abc.abcdef', 5)
     # FIXME: what is expected is TBD
     expected = ''
     assert expected == test
Example #19
0
 def test_fixed_width_file_name_with_win_path_without_shortening(self):
     test = cli.fixed_width_file_name(
         'C\\:Documents_and_Settings\\Boki\\Desktop\\head\\patches\\drupal6\\drupal.js',
         25)
     expected = 'drupal.js'
     assert expected == test
Example #20
0
 def test_fixed_width_file_name_with_file_name_larger_than_max_length_is_shortened(
         self):
     test = cli.fixed_width_file_name('0123456789012345678901234.c', 25)
     expected = '0123456789...5678901234.c'
     assert expected == test
Example #21
0
 def test_fixed_width_file_name_with_very_small_file_name_and_long_extension(
         self):
     test = cli.fixed_width_file_name('abc.abcdef', 5)
     # FIXME: what is expected is TBD
     expected = ''
     assert expected == test
Example #22
0
 def test_fixed_width_file_name_with_file_name_larger_than_max_length_is_shortened(self):
     test = cli.fixed_width_file_name('0123456789012345678901234.c', 25)
     expected = '0123456789...5678901234.c'
     assert expected == test