mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2025-01-09 04:18:46 +08:00
tests: validate config docstring is current
This commit is contained in:
parent
c41e87160a
commit
d156fd2093
16
tests/test_docs.py
Normal file
16
tests/test_docs.py
Normal file
@ -0,0 +1,16 @@
|
||||
from invokeai.app.services.config.config_default import InvokeAIAppConfig
|
||||
|
||||
|
||||
def test_app_config_docstrings_are_current():
|
||||
# If this test fails, run `python scripts/generate_config_docstring.py`. See the comments in that script for
|
||||
# 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
|
||||
|
||||
generated_docstring = InvokeAIAppConfig.generate_docstrings()
|
||||
|
||||
formatted_dunder_docstring = f' """{InvokeAIAppConfig.__doc__.strip()}\n """'
|
||||
|
||||
assert generated_docstring == formatted_dunder_docstring
|
Loading…
Reference in New Issue
Block a user