Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/framework/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,9 @@ def test_copy_file(self):

# clean error when trying to copy a directory with copy_file
src, target = os.path.dirname(to_copy), os.path.join(self.test_prefix, 'toy')
self.assertErrorRegex(EasyBuildError, "Failed to copy file.*Is a directory", ft.copy_file, src, target)
# error message was changed in Python 3.9.7 to "FileNotFoundError: Directory does not exist"
error_pattern = "Failed to copy file.*(Is a directory|Directory does not exist)"
self.assertErrorRegex(EasyBuildError, error_pattern, ft.copy_file, src, target)

# test overwriting of existing file owned by someone else,
# which should make copy_file use shutil.copyfile rather than shutil.copy2
Expand Down