diff --git a/tests/test_config.py b/tests/test_config.py index 7805be4fd2..c8922a9cb3 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,10 +1,10 @@ import os +from pathlib import Path from typing import Any -from pydantic import ValidationError import pytest from omegaconf import OmegaConf -from pathlib import Path +from pydantic import ValidationError from invokeai.app.services.config import InvokeAIAppConfig @@ -150,6 +150,20 @@ def test_type_coercion(patch_rootdir): assert isinstance(conf.root, Path) +@pytest.mark.xfail( + reason=""" + This test fails when run as part of the full test suite. + + This test needs to deny nodes from being included in the InvocationsUnion by providing + an app configuration as a test fixture. Pytest executes all test files before running + tests, so the app configuration is already initialized by the time this test runs. + + This test passes when `test_config.py` is tested in isolation. + + Perhaps a solution would be to call `InvokeAIAppConfig.get_config().parse_args()` in + other test files? + """ +) def test_deny_nodes(patch_rootdir): # Allow integer, string and float, but explicitly deny float allow_deny_nodes_conf = OmegaConf.create(