Commit 99af4ea
fix(test): make setup_logging config-dir regression test Windows-safe
``test_setup_logging_honors_basic_memory_config_dir`` was monkeypatching
``utils.os.name`` to ``"posix"`` to force ``setup_logging`` onto the
shared-log-filename branch, which let the test assert on the exact
path. That globally redirected ``os.name``, and on Windows CI that
broke ``Path(str)`` dispatch inside ``resolve_data_dir``:
pathlib.UnsupportedOperation: cannot instantiate 'PosixPath' on
your system
The regression guard only cares that the log file lives under the
redirected ``BASIC_MEMORY_CONFIG_DIR`` — not at ``Path.home()``. It
does not care whether the filename is the shared ``basic-memory.log``
(POSIX) or the per-process ``basic-memory-<pid>.log`` (Windows).
Drop the ``os.name`` patch, assert on ``log_path.parent`` equalling
the custom dir, and sanity-check the filename pattern without pinning
the pid suffix. Same intent, portable.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Drew Cain <groksrc@gmail.com>1 parent e39b8e1 commit 99af4ea
1 file changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
100 | | - | |
101 | 109 | | |
102 | 110 | | |
103 | 111 | | |
| |||
109 | 117 | | |
110 | 118 | | |
111 | 119 | | |
112 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
113 | 125 | | |
114 | 126 | | |
115 | 127 | | |
| |||
0 commit comments