Пример #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(''), '/')