diff options
author | Bastien Montagne <bastien@blender.org> | 2021-11-04 17:03:55 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-11-04 17:06:58 +0300 |
commit | d3328fabc982279ce0922294b99201a61bb266fd (patch) | |
tree | ec639b98a0ddcfbdfbb720520a8c26ced8070473 /tests | |
parent | 8eff1eca52f2be8df077811a4c16e49b5e799a1e (diff) |
Attempt to fix failing lib link test on windows.
According to https://docs.python.org/3/library/os.html#os.rename,
`os.rename` has os-specific behavior, and will fail in case you attempt
to rename to an existing file on windows.
So using `os.replace` instead, which should be os-agnostic.
NOTE: Fact that temp test directory is not cleared after tests are
sucessfully ran does not sound great...
Diffstat (limited to 'tests')
-rw-r--r-- | tests/python/bl_blendfile_liblink.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/python/bl_blendfile_liblink.py b/tests/python/bl_blendfile_liblink.py index 08237f71673..760a1a15959 100644 --- a/tests/python/bl_blendfile_liblink.py +++ b/tests/python/bl_blendfile_liblink.py @@ -424,7 +424,7 @@ class TestBlendLibLibraryRelocate(TestBlendLibLinkHelper): lib_path, lib_ext = os.path.splitext(output_lib_path) new_lib_path = lib_path + "_relocate" + lib_ext - os.rename(output_lib_path, new_lib_path) + os.replace(output_lib_path, new_lib_path) bpy.ops.wm.lib_relocate(library=bpy.data.objects[0].name, directory="", filename=new_lib_path) |