fix: keep tests and doc generators away from the developer's config files

test_docsphinx pointed EOS_DIR/EOS_CONFIG_DIR at an empty temporary
directory. EOS then fell back to the config file in the user config
directory, migrated it and wrote it back with a timestamped backup. The
test now writes an empty config file into the temporary directory, as
server_base does.

Additional fixes
- Decode the Sphinx output in test_sphinx_build as UTF-8; on Windows the
  default code page failed and the test reported a NoneType error.
- Check the user config directory with the app author in
  --check-config-side-effect, as EOS does; on Windows the check looked at
  the wrong directory.
- Let the doc generators create EOS' config file in a temporary directory.
  They left an EOS.config.json in the working directory, and a following
  make test-ci then failed in every test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bobby Noelte
2026-11-09 13:40:25 +01:00
committed by GitHub
co-authored by Claude Opus 5.5
parent d68f040206
commit c230d9d9de
5 changed files with 30 additions and 5 deletions
+2 -1
View File
@@ -211,7 +211,8 @@ def cfg_non_existent(request):
# Before test
from platformdirs import user_config_dir
user_dir = user_config_dir(ConfigEOS.APP_NAME)
# The same directory as ConfigEOS uses (app author matters on Windows).
user_dir = user_config_dir(ConfigEOS.APP_NAME, ConfigEOS.APP_AUTHOR)
user_config_file = Path(user_dir).joinpath(ConfigEOS.CONFIG_FILE_NAME)
cwd_config_file = Path.cwd().joinpath(ConfigEOS.CONFIG_FILE_NAME)
assert not user_config_file.exists(), (