You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: slim _graph_endpoints unit tests, drop redundant happy-path checks
The happy-path coverage (custom-named-step flows producing the right
endpoints) lives in test/ux/core/test_basic.py, which runs real flows
via the Runner / scheduler deployer chain across local and scheduler
modes. Three of the unit tests in this file were just re-asserting that
contract without exercising the metadata layer end-to-end.
Drop:
- test_metadata_carries_endpoints (covered by test_custom_step_names)
- test_partial_metadata_fills_in_defaults (edge case, dict.get semantics)
- test_result_cached (cache write is implicitly verified by
test_metaflow_not_found_caches_fallback)
Replace the make_run factory fixture and the __class__ swap trick with
mocker.patch.object(Run, "__getitem__", ...) on a Run.__new__(Run)
instance. This is the pytest-mock idiom now codified in
CONTRIBUTING.md and matches how other unit tests will look going
forward.
Three tests remain, each pinning a non-obvious behavior:
- empty metadata falls back to ("start", "end")
- MetaflowNotFound (old run) caches the fallback
- transient exceptions do NOT cache (so a retry can succeed)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments