Repository navigation
Commit a47d1a6
Make the import side-effect tests pass on Windows and under mypy tests/
The first cut failed CI in two places, neither in the fix itself:
- mypy tests/ (which CI runs, alongside mypy vgi/) flagged four
`type: ignore[type-var]` comments as unused.
- On Windows, test_storage_is_still_created_on_first_use looked for the
database under the temporary HOME, but platformdirs asks Windows for its
folders directly and ignores HOME and XDG there, so the store landed in
the real LOCAL_APPDATA. The isolated environment now also sets
platformdirs' WIN_PD_OVERRIDE_LOCAL_APPDATA and WIN_PD_OVERRIDE_APPDATA.
The import test also now asserts, inside the subprocess, that the storage
descriptor was never resolved, reading it through Function.__dict__ so the
read cannot resolve it either. That check does not depend on where any
platform keeps its state directory. The import tests still fail on the
pre-fix code.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 94df3e3 commit a47d1a6
1 file changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
62 | 73 | | |
63 | 74 | | |
64 | 75 | | |
| |||
127 | 138 | | |
128 | 139 | | |
129 | 140 | | |
130 | | - | |
| 141 | + | |
131 | 142 | | |
132 | 143 | | |
133 | 144 | | |
| |||
139 | 150 | | |
140 | 151 | | |
141 | 152 | | |
142 | | - | |
| 153 | + | |
143 | 154 | | |
144 | 155 | | |
145 | 156 | | |
| |||
158 | 169 | | |
159 | 170 | | |
160 | 171 | | |
161 | | - | |
| 172 | + | |
162 | 173 | | |
163 | 174 | | |
164 | 175 | | |
| |||
177 | 188 | | |
178 | 189 | | |
179 | 190 | | |
180 | | - | |
| 191 | + | |
181 | 192 | | |
182 | 193 | | |
183 | 194 | | |
| |||
0 commit comments