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:
Diffstat (limited to 'tests')
-rw-r--r--tests/python/bl_load_addons.py3
-rw-r--r--tests/python/bl_pyapi_bpy_path.py12
2 files changed, 8 insertions, 7 deletions
diff --git a/tests/python/bl_load_addons.py b/tests/python/bl_load_addons.py
index 01f0b4d72d8..60f44c9452a 100644
--- a/tests/python/bl_load_addons.py
+++ b/tests/python/bl_load_addons.py
@@ -59,7 +59,8 @@ def _init_addon_blacklist():
def addon_modules_sorted():
- modules = addon_utils.modules({})
+ # Pass in an empty module cache to prevent `addon_utils` local module cache being manipulated.
+ modules = addon_utils.modules(module_cache={})
modules[:] = [
mod for mod in modules
if not (mod.__file__.startswith(BLACKLIST_DIRS))
diff --git a/tests/python/bl_pyapi_bpy_path.py b/tests/python/bl_pyapi_bpy_path.py
index 2d6019fbb07..ddb13cfe2ce 100644
--- a/tests/python/bl_pyapi_bpy_path.py
+++ b/tests/python/bl_pyapi_bpy_path.py
@@ -26,12 +26,12 @@ class TestBpyPath(unittest.TestCase):
self.assertEqual(ensure_ext('', ''), '')
self.assertEqual(ensure_ext('', '.blend'), '.blend')
- # Test case-sensitive behaviour.
- self.assertEqual(ensure_ext('demo', '.blend', True), 'demo.blend')
- self.assertEqual(ensure_ext('demo.BLEND', '.blend', True), 'demo.BLEND.blend')
- self.assertEqual(ensure_ext('demo', 'Blend', True), 'demoBlend')
- self.assertEqual(ensure_ext('demoBlend', 'blend', True), 'demoBlendblend')
- self.assertEqual(ensure_ext('demo', '', True), 'demo')
+ # Test case-sensitive behavior.
+ self.assertEqual(ensure_ext('demo', '.blend', case_sensitive=True), 'demo.blend')
+ self.assertEqual(ensure_ext('demo.BLEND', '.blend', case_sensitive=True), 'demo.BLEND.blend')
+ self.assertEqual(ensure_ext('demo', 'Blend', case_sensitive=True), 'demoBlend')
+ self.assertEqual(ensure_ext('demoBlend', 'blend', case_sensitive=True), 'demoBlendblend')
+ self.assertEqual(ensure_ext('demo', '', case_sensitive=True), 'demo')
if __name__ == '__main__':