Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2019-06-28 15:37:04 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-06-28 15:37:04 +0300
commit2ffcb80cb65aef841805d70b56f97108f5ad0f4c (patch)
tree36247d18b68e648bb07700ece68131aaa5391523 /tests
parentdee6fe1441aeb875bcebb8c363ade4e2db4c888e (diff)
Python tests: replaced `imp` with `importlib`
The `imp` module has been deprecated since Python 3.4, and is replaced by `importlib`.
Diffstat (limited to 'tests')
-rw-r--r--tests/python/bl_load_addons.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/python/bl_load_addons.py b/tests/python/bl_load_addons.py
index 0df98585062..bb730bc362c 100644
--- a/tests/python/bl_load_addons.py
+++ b/tests/python/bl_load_addons.py
@@ -29,7 +29,7 @@ import addon_utils
import os
import sys
-import imp
+import importlib
BLACKLIST_DIRS = (
os.path.join(bpy.utils.resource_path('USER'), "scripts"),
@@ -121,7 +121,7 @@ def reload_addons(do_reload=True, do_reverse=True):
# now test reloading
if do_reload:
- imp.reload(sys.modules[mod_name])
+ sys.modules[mod_name] = importlib.reload(sys.modules[mod_name])
if do_reverse:
# in case order matters when it shouldn't