示例#1
0
 def test_folder_path_remove_multiple_slashes(self):
     self.assertEqual(normalise_folder_path('/path//to/folder///'),
                      '/path/to/folder')
示例#2
0
 def test_folder_path_with_trailing_slash(self):
     self.assertEqual(normalise_folder_path('/path/to/folder/'),
                      '/path/to/folder')
示例#3
0
 def test_folder_path_slashes_reversed(self):
     self.assertEqual(normalise_folder_path('path/to/folder/'),
                      '/path/to/folder')
示例#4
0
 def test_already_normalised_folder_path(self):
     self.assertEqual(normalise_folder_path('/path/to/folder'),
                      '/path/to/folder')
示例#5
0
 def test_folder_path_without_leading_slash(self):
     self.assertEqual(normalise_folder_path('path/to/folder'),
                      '/path/to/folder')
示例#6
0
 def test_folder_path_remove_multiple_slashes(self):
     self.assertEqual(normalise_folder_path('/path//to/folder///'),
                      '/path/to/folder')
示例#7
0
 def test_empty_folder_path(self):
     self.assertEqual(normalise_folder_path(''),'/')
示例#8
0
 def test_folder_path_slashes_reversed(self):
     self.assertEqual(normalise_folder_path('path/to/folder/'),
                      '/path/to/folder')
示例#9
0
 def test_folder_path_with_trailing_slash(self):
     self.assertEqual(normalise_folder_path('/path/to/folder/'),
                      '/path/to/folder')
示例#10
0
 def test_folder_path_without_leading_slash(self):
     self.assertEqual(normalise_folder_path('path/to/folder'),
                      '/path/to/folder')
示例#11
0
 def test_already_normalised_folder_path(self):
     self.assertEqual(normalise_folder_path('/path/to/folder'),
                      '/path/to/folder')
示例#12
0
 def test_empty_folder_path(self):
     self.assertEqual(normalise_folder_path(''), '/')