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:
authorDalai Felinto <dfelinto@gmail.com>2017-06-21 16:14:42 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-06-21 16:14:42 +0300
commit4ceb006706579a0ad2301d2cde57489b69a7683c (patch)
tree3825806212dd3d3e5f8a44a16b9b82cfe8142c81 /tests
parent2ae172ec32da4a1aacd268bdba45bf82cff7eea9 (diff)
parent22466a5bdff73afb6ad3afd408e265517e4f3733 (diff)
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'tests')
-rw-r--r--tests/python/CMakeLists.txt8
-rwxr-xr-xtests/python/alembic_tests.py2
-rw-r--r--tests/python/bl_alembic_import_test.py5
-rw-r--r--tests/python/bl_load_py_modules.py8
4 files changed, 17 insertions, 6 deletions
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index dc0ad648ac2..20fa8257a32 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -468,12 +468,13 @@ if(WITH_ALEMBIC)
--testdir "${TEST_SRC_DIR}/alembic"
--alembic-root "${ALEMBIC_ROOT_DIR}"
)
- add_test(NAME script_alembic_import
- COMMAND
- "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
+ add_test(NAME script_alembic_import
+ COMMAND
+ "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
--
--testdir "${TEST_SRC_DIR}/alembic"
+ --with-legacy-depsgraph=${WITH_LEGACY_DEPSGRAPH}
)
else()
@@ -487,6 +488,7 @@ if(WITH_ALEMBIC)
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
--
--testdir "${TEST_SRC_DIR}/alembic"
+ --with-legacy-depsgraph=${WITH_LEGACY_DEPSGRAPH}
)
endif()
diff --git a/tests/python/alembic_tests.py b/tests/python/alembic_tests.py
index e36a6391298..96a68de9801 100755
--- a/tests/python/alembic_tests.py
+++ b/tests/python/alembic_tests.py
@@ -157,6 +157,8 @@ class AbstractAlembicTest(unittest.TestCase):
if proptype == 'CompoundProperty':
# To read those, call self.abcprop() on it.
continue
+ if len(parts) < 2:
+ raise ValueError('Error parsing result from abcprop: %s', info.strip())
valtype_and_arrsize, name_and_extent = parts[1:]
# Parse name and extent
diff --git a/tests/python/bl_alembic_import_test.py b/tests/python/bl_alembic_import_test.py
index e9dcbd80a3a..2f3daaefd44 100644
--- a/tests/python/bl_alembic_import_test.py
+++ b/tests/python/bl_alembic_import_test.py
@@ -129,6 +129,9 @@ class SimpleImportTest(AbstractAlembicTest):
bpy.data.cache_files[fname].filepath = relpath.replace('1.abc', '2.abc')
bpy.context.scene.update()
+ if args.with_legacy_depsgraph:
+ bpy.context.scene.frame_set(10)
+
x, y, z = cube.matrix_world.to_euler('XYZ')
self.assertAlmostEqual(x, math.pi / 2, places=5)
self.assertAlmostEqual(y, 0)
@@ -213,6 +216,8 @@ def main():
parser = argparse.ArgumentParser()
parser.add_argument('--testdir', required=True, type=pathlib.Path)
+ parser.add_argument('--with-legacy-depsgraph', default=False,
+ type=lambda v: v in {'ON', 'YES', 'TRUE'})
args, remaining = parser.parse_known_args(argv)
unittest.main(argv=remaining)
diff --git a/tests/python/bl_load_py_modules.py b/tests/python/bl_load_py_modules.py
index c13679d16f0..4935491a6be 100644
--- a/tests/python/bl_load_py_modules.py
+++ b/tests/python/bl_load_py_modules.py
@@ -36,6 +36,9 @@ BLACKLIST = {
"cycles",
"io_export_dxf", # TODO, check on why this fails
'io_import_dxf', # Because of cydxfentity.so dependency
+
+ # The unpacked wheel is only loaded when actually used, not directly on import:
+ "io_blend_utils/blender_bam-unpacked.whl",
}
# Some modules need to add to the `sys.path`.
@@ -211,11 +214,10 @@ def load_modules():
[(os.sep + f + ".py") for f in BLACKLIST])
for f in source_files:
- ok = False
for ignore in ignore_paths:
if ignore in f:
- ok = True
- if not ok:
+ break
+ else:
raise Exception("Source file %r not loaded in test" % f)
print("loaded %d modules" % len(loaded_files))