From 00c4f49a6d806094b2b5ef5e468b3d7114684537 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 12 Jun 2017 13:35:00 +1000 Subject: Cleanup: indentation, long lines --- tests/python/bl_alembic_import_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/python/bl_alembic_import_test.py') diff --git a/tests/python/bl_alembic_import_test.py b/tests/python/bl_alembic_import_test.py index 358b8a3c758..0e7257d30b9 100644 --- a/tests/python/bl_alembic_import_test.py +++ b/tests/python/bl_alembic_import_test.py @@ -207,7 +207,7 @@ def main(): import argparse if '--' in sys.argv: - argv = [sys.argv[0]] + sys.argv[sys.argv.index('--')+1:] + argv = [sys.argv[0]] + sys.argv[sys.argv.index('--') + 1:] else: argv = sys.argv -- cgit v1.2.3 From 81775e19203c8ca0b1079f18532ef34e9d284889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 19 Jun 2017 17:50:43 +0200 Subject: Fix T51762: Unit test script_alembic_import is failing. Implemented workaround for use with the legacy depsgraph. --- tests/python/bl_alembic_import_test.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/python/bl_alembic_import_test.py') 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) -- cgit v1.2.3