Commit f9a6ec9
committed
test(typehints-gp[field-xref]) Module-scope lambda-default fixture
why: PR #36 review caught a function-scoped Sphinx build inside
`test_unsupported_default_falls_back_to_plain_text` — CLAUDE.md
requires every integration test's Sphinx build to live in a module-
or session-scoped fixture so the build cost is shared across runs.
The three sibling tests in the file already follow the rule; this
one was the outlier because it was the last test added and used a
one-off scenario.
what:
- Hoist the lambda fixture project's module source into a
module-level `_LAMBDA_MODULE_SOURCE` constant alongside the
existing `_DATA_ATTRIBUTE_MODULE_SOURCE` and `_CROSS_MODULE_*`
constants.
- Add `lambda_default_html_result` as a
`@pytest.fixture(scope="module")` wrapping
`build_shared_sphinx_result`, mirroring the existing three
fixtures in shape (parameter list, scenario construction,
`purge_modules=("lambda_demo",)` argument).
- Convert `test_unsupported_default_falls_back_to_plain_text` to
consume the fixture parameter and call `read_output` directly;
the two assertions are unchanged so the test still pins the
plain-text-fallback contract for unparseable lambda defaults.1 parent 8dc90a0 commit f9a6ec9
1 file changed
Lines changed: 24 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
302 | 297 | | |
303 | 298 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
308 | 310 | | |
309 | 311 | | |
310 | 312 | | |
311 | | - | |
| 313 | + | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
| |||
327 | 329 | | |
328 | 330 | | |
329 | 331 | | |
330 | | - | |
| 332 | + | |
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
334 | 336 | | |
335 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
336 | 345 | | |
337 | 346 | | |
338 | 347 | | |
| |||
0 commit comments