ap_config_backup_fixture.py 672 B

123456789101112131415161718192021222324
  1. """
  2. Copyright (c) Contributors to the Open 3D Engine Project.
  3. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. SPDX-License-Identifier: Apache-2.0 OR MIT
  5. Fixture for backing up and restoring <EngineRoot>\Registry\AssetProcessorPlatformConfig.setreg
  6. """
  7. # Import builtin libraries
  8. import pytest
  9. @pytest.fixture
  10. def ap_config_backup_fixture(request, workspace) -> None:
  11. workspace.settings._backup_settings(workspace.paths.asset_processor_config_file(), None)
  12. def teardown():
  13. workspace.settings._restore_settings(workspace.paths.asset_processor_config_file(), None)
  14. request.addfinalizer(teardown)