Exemple #1
0
    def test_correct_directory_removed(self):
        current_dirs = "A/Path/;Another/Path/;A/Final/Path/"
        file_to_remove = "Another/Path/"
        result = remove_dir_from_datasearch(file_to_remove, current_dirs)

        expected_result = "A/Path/;A/Final/Path/"
        self.assertEqual(expected_result, result)
    def test_correct_directory_removed(self):
        current_dirs = "A/Path/;Another/Path/;A/Final/Path/"
        file_to_remove = "Another/Path/"
        result = remove_dir_from_datasearch(file_to_remove, current_dirs)

        expected_result = "A/Path/;A/Final/Path/"
        self.assertEqual(expected_result, result)
Exemple #3
0
    def test_directories_unchanged_when_removing_empty_string(self):
        current_dirs = "A/Path/;Another/Path/"
        file_to_remove = ""
        result = remove_dir_from_datasearch(file_to_remove, current_dirs)

        expected_result = "A/Path/;Another/Path/"
        self.assertEqual(result, expected_result)
    def test_directories_unchanged_when_removing_empty_string(self):
        current_dirs = "A/Path/;Another/Path/"
        file_to_remove = ""
        result = remove_dir_from_datasearch(file_to_remove, current_dirs)

        expected_result = "A/Path/;Another/Path/"
        self.assertEqual(result, expected_result)