From 28a1a6939f9e99deea367be8204ddbe6b62494bd Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Thu, 21 Sep 2023 12:43:34 -0400 Subject: [PATCH] add regression test --- tests/test_config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_config.py b/tests/test_config.py index a950a9c06f..2b2492f6a6 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -121,6 +121,12 @@ def test_env_override(patch_rootdir): conf.parse_args(conf=init1, argv=[]) assert conf.max_cache_size == 20 + # make sure that prefix is respected + del os.environ["INVOKEAI_always_use_cpu"] + os.environ["always_use_cpu"] = "True" + conf.parse_args(conf=init1, argv=[]) + assert conf.always_use_cpu is False + def test_root_resists_cwd(patch_rootdir): from invokeai.app.services.config import InvokeAIAppConfig