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
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-06-19 18:50:43 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-06-19 18:50:43 +0300
commit81775e19203c8ca0b1079f18532ef34e9d284889 (patch)
treeca66d64423ce65a3257fffd6d3c1368122b944ba /tests/python
parent7461bb3f52e7463b70ddadd35c7066f3c643c55d (diff)
Fix T51762: Unit test script_alembic_import is failing.
Implemented workaround for use with the legacy depsgraph.
Diffstat (limited to 'tests/python')
-rw-r--r--tests/python/CMakeLists.txt2
-rw-r--r--tests/python/bl_alembic_import_test.py5
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index d4326d48d6d..9e1ebcbe669 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -474,6 +474,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}
)
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/bl_alembic_import_test.py b/tests/python/bl_alembic_import_test.py
index 0e7257d30b9..d8cd64a1d56 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)