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:
parent
b248295530
commit
932a85a24f
|
@ -13,7 +13,7 @@ def _run(filepath):
|
||||||
|
|
||||||
# Load once to ensure it's cached by OS
|
# Load once to ensure it's cached by OS
|
||||||
bpy.ops.wm.open_mainfile(filepath=filepath)
|
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
|
# Measure loading the second time
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
|
|
|
@ -256,7 +256,7 @@ class CameraExportImportTest(unittest.TestCase):
|
||||||
# Unload the current blend file to release the imported Alembic file.
|
# Unload the current blend file to release the imported Alembic file.
|
||||||
# This is necessary on Windows in order to be able to delete the
|
# This is necessary on Windows in order to be able to delete the
|
||||||
# temporary ABC file.
|
# temporary ABC file.
|
||||||
bpy.ops.wm.read_homefile()
|
bpy.ops.wm.read_homefile(use_empty=True, use_factory_startup=True)
|
||||||
self._tempdir.cleanup()
|
self._tempdir.cleanup()
|
||||||
|
|
||||||
def test_export_hierarchy(self):
|
def test_export_hierarchy(self):
|
||||||
|
|
Loading…
Reference in New Issue