Conversation
…t_config
The assertion `assert "AppData" not in str(paths.config_dir)` failed on
Windows-hosted CI because pytest's tmp_path is located under
AppData\Local\Temp\..., so "AppData" appears in the full absolute path even
when the Linux config-path logic is correct.
Replace the three vague substring checks with a single exact pathlib
comparison:
assert paths.config_dir == tmp_path / ".config" / "agileforecasting"
This is stricter (exact match, not substring), platform-agnostic (does not
depend on where tmp_path is rooted), and makes the intent explicit: on Linux
the config directory must be exactly <home>/.config/agileforecasting.
The production code in secure_store._config_base() is unchanged — it was
correct before and after this fix.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
test_linux_uses_dot_configwas failing on thetest-windowsCI job with:The production code was correct. The path correctly ended in
.config\agileforecasting, but the assertion"AppData" not in str(paths.config_dir)checked the full absolute path string. On Windows CI, pytest's
tmp_pathisrooted inside
AppData\Local\Temp, so "AppData" appeared in the prefix eventhough the Linux config-path logic was working as intended.
Fix
Replace the three vague substring assertions with a single exact
pathlibcomparison:This is:
tmp_pathis rooted<home>/.config/agileforecasting) is stated directlyThe production code in
secure_store._config_base()is unchanged.Test results
pytest tests/test_windows_compat.py→ 16 passedpytest --ignore=tests/test_chart_export.py→ 96 passed (mirrors Windows CI job)