2024-03-15 10:50:42 +00:00
|
|
|
from invokeai.app.services.config.config_default import InvokeAIAppConfig
|
|
|
|
from scripts.update_config_docstring import generate_config_docstrings
|
2024-03-08 00:53:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_app_config_docstrings_are_current():
|
2024-08-08 19:20:43 +00:00
|
|
|
# If this test fails, run `python scripts/update_config_docstring.py`. See the comments in that script for
|
2024-03-08 00:53:49 +00:00
|
|
|
# an explanation of why this is necessary.
|
|
|
|
#
|
|
|
|
# A make target is provided to run the script: `make update-config-docstring`.
|
|
|
|
|
|
|
|
assert InvokeAIAppConfig.__doc__ is not None
|
|
|
|
|
2024-03-11 13:29:44 +00:00
|
|
|
generated_docstring = generate_config_docstrings()
|
2024-03-08 00:53:49 +00:00
|
|
|
|
|
|
|
formatted_dunder_docstring = f' """{InvokeAIAppConfig.__doc__.strip()}\n """'
|
|
|
|
|
|
|
|
assert generated_docstring == formatted_dunder_docstring
|