Reorder so kernel-state tests run last. The kernel tests exercise long-lived Lean state objects whose finalisation interacts poorly with later tests. Reordering keeps the rest of the suite green.
(config, items)
| 30 | |
| 31 | |
| 32 | def pytest_collection_modifyitems(config, items): |
| 33 | """Reorder so kernel-state tests run last. |
| 34 | |
| 35 | The kernel tests exercise long-lived Lean state objects whose |
| 36 | finalisation interacts poorly with later tests. Reordering keeps |
| 37 | the rest of the suite green. |
| 38 | """ |
| 39 | |
| 40 | def is_kernel_full(item): |
| 41 | return "test_kernel_full" in item.nodeid |
| 42 | |
| 43 | items.sort(key=is_kernel_full) |