Skip to content

Commit

Permalink
removed duplicated test
Browse files Browse the repository at this point in the history
  • Loading branch information
wangpatrick57 committed Jul 9, 2024
1 parent da3c0d2 commit 54d1e7e
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions manage/tests/test_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,35 +635,6 @@ def test_broken_symlink_has_no_effect(self):
clean_workspace(MockDBGymConfig(self.scratchspace_path), mode="safe")
self.assertTrue(CleanTests.verify_structure(self.scratchspace_path, ending_structure))

def test_broken_symlink_has_no_effect(self):
starting_symlinks_structure = {
"symlink1": ("symlink", "task_runs/dir1")
}
starting_task_runs_structure = {
"dir1": {
"file1.txt": ("file",),
"symlink2": ("symlink", "task_runs/dir1/non_existent_file.txt")
},
"dir2": {
"file2.txt": ("file",)
}
}
starting_structure = CleanTests.make_workspace_structure(starting_symlinks_structure, starting_task_runs_structure)
ending_symlinks_structure = {
"symlink1": ("symlink", "task_runs/dir1")
}
ending_task_runs_structure = {
"dir1": {
"file1.txt": ("file",),
"symlink2": ("symlink", None)
}
}
ending_structure = CleanTests.make_workspace_structure(ending_symlinks_structure, ending_task_runs_structure)

CleanTests.create_structure(self.scratchspace_path, starting_structure)
clean_workspace(MockDBGymConfig(self.scratchspace_path), mode="safe")
self.assertTrue(CleanTests.verify_structure(self.scratchspace_path, ending_structure))

# The idea behind this test is that we shouldn't be following links outside of task_runs, even on safe mode
def test_link_to_folder_outside_runs_that_contains_link_to_other_run_doesnt_save_other_run(self):
starting_symlinks_structure = {
Expand Down

0 comments on commit 54d1e7e

Please sign in to comment.