Commit 7f0aae8
test: prime cache in invalidation tests; use is-None cache guard
Six of the suffixes_prefixes_titles tests passed against the unfixed
code because they read the property only once on a cold cache, so they
asserted "the union includes its source sets" rather than "the cache
stays consistent after a mutation." Prime the cache before mutating so
they actually exercise invalidation; verified they now fail (14 across
the dual-run fixture) against master's pre-fix config.
Change the property guard from `if not self._pst` to `if self._pst is
None` so a legitimately empty union caches instead of recomputing on
every access — and so "cached" means "computed," which is the state the
primed tests rely on.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 5fc4b6b commit 7f0aae8
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| 148 | + | |
145 | 149 | | |
146 | 150 | | |
147 | 151 | | |
| |||
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| 162 | + | |
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| 169 | + | |
164 | 170 | | |
165 | 171 | | |
0 commit comments