Fix tests failing from errors in the users startup file
Tests should never depend on the users startup.blend which can have settings that interfere with tests. Failure to load the user startup.blend for e.g. prevented bl_alembic_io_test from passing.
This commit is contained in:
@@ -13,7 +13,7 @@ def _run(filepath):
|
||||
|
||||
# Load once to ensure it's cached by OS
|
||||
bpy.ops.wm.open_mainfile(filepath=filepath)
|
||||
bpy.ops.wm.read_homefile()
|
||||
bpy.ops.wm.read_homefile(use_empty=True, use_factory_startup=True)
|
||||
|
||||
# Measure loading the second time
|
||||
start_time = time.time()
|
||||
|
||||
@@ -256,7 +256,7 @@ class CameraExportImportTest(unittest.TestCase):
|
||||
# Unload the current blend file to release the imported Alembic file.
|
||||
# This is necessary on Windows in order to be able to delete the
|
||||
# temporary ABC file.
|
||||
bpy.ops.wm.read_homefile()
|
||||
bpy.ops.wm.read_homefile(use_empty=True, use_factory_startup=True)
|
||||
self._tempdir.cleanup()
|
||||
|
||||
def test_export_hierarchy(self):
|
||||
|
||||
Reference in New Issue
Block a user