From 499edf960d4cf8ae7b7c61b8cee28702883790ed Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 1 May 2023 15:35:27 +0500 Subject: [PATCH] Test command to load blend file during test scenario for debugging --- src/blenderbim/test/bim/test_feature.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/blenderbim/test/bim/test_feature.py b/src/blenderbim/test/bim/test_feature.py index 4409801795..baae5eb5e5 100644 --- a/src/blenderbim/test/bim/test_feature.py +++ b/src/blenderbim/test/bim/test_feature.py @@ -751,6 +751,14 @@ def saving_sample_test_files(and_open_in_blender=None): bpy.ops.wm.save_as_mainfile(filepath=f"{filepath}.blend") +@given(parsers.parse("I load test blend file")) +@when(parsers.parse("I load test blend file")) +@then(parsers.parse("I load test blend file")) +def opening_sample_test_files_in_blender(): + filepath = f"{variables['cwd']}/test/files/temp/sample_test_file.blend" + bpy.ops.wm.open_mainfile(filepath=filepath, display_file_selector=False) + + # TODO: merge to single fixture with `saving_sample_test_files`; add "and wait" @given(parsers.parse("I save sample test files and open in blender")) @when(parsers.parse("I save sample test files and open in blender"))