MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / pytest_collection_modifyitems

Function pytest_collection_modifyitems

tests/conftest.py:32–43  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

30
31
32def 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)

Callers

nothing calls this directly

Calls 1

sortMethod · 0.45

Tested by

no test coverage detected