Skip to content

Commit b51664d

Browse files
committed
Merge branch '159-expand-ci-testing' of https://github.com/CCPBioSim/CodeEntropy into 159-expand-ci-testing
2 parents 5fd7935 + 97b98db commit b51664d

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

tests/test_CodeEntropy/test_run.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def test_create_job_folder_with_non_matching_folders(
8383
folders.
8484
"""
8585
mock_listdir.return_value = ["folderA", "another_one"]
86+
8687
new_folder_path = RunManager.create_job_folder()
8788
expected_path = os.path.join(self.test_dir, "job001")
8889

@@ -106,12 +107,14 @@ def test_create_job_folder_mixed_folder_names(self, mock_listdir, mock_makedirs)
106107
new_folder_path = RunManager.create_job_folder()
107108
expected_path = os.path.join(self.test_dir, "job003")
108109
self.assertEqual(
109-
os.path.realpath(new_folder_path), os.path.realpath(expected_path)
110-
)
111-
mock_makedirs.assert_called_once_with(
112-
os.path.realpath(expected_path), exist_ok=True
110+
os.path.normcase(os.path.abspath(new_folder_path)),
111+
os.path.normcase(os.path.abspath(expected_path)),
113112
)
114113

114+
called_path = os.path.normcase(os.path.abspath(mock_makedirs.call_args[0][0]))
115+
self.assertEqual(called_path, os.path.normcase(os.path.abspath(expected_path)))
116+
self.assertTrue(mock_makedirs.call_args[1]["exist_ok"])
117+
115118
@patch("os.makedirs")
116119
@patch("os.listdir")
117120
def test_create_job_folder_with_invalid_job_suffix(

0 commit comments

Comments
 (0)