Skip to content

Python(feat): pytest parameterize support#570

Draft
alexluck-sift wants to merge 3 commits into
al/python/graceful-handle-missing-connectionfrom
al/python/feat/pytest-parameterize-support
Draft

Python(feat): pytest parameterize support#570
alexluck-sift wants to merge 3 commits into
al/python/graceful-handle-missing-connectionfrom
al/python/feat/pytest-parameterize-support

Conversation

@alexluck-sift
Copy link
Copy Markdown
Collaborator

@alexluck-sift alexluck-sift commented May 16, 2026

Summary

  • Add nested-parametrize step trees to the pytest plugin: parametrized tests cluster under one shared parent (e.g. test_foo), and stacked @pytest.mark.parametrize decorators nest outer-to-inner.
  • Stash each item's parametrize path in pytest_collection_modifyitems and sort items by it so siblings share a single open parent step; a new autouse _parametrize_parents fixture diffs the path against the open stack and opens/closes parents lazily.
  • Drain any open parametrize parents on module_substep teardown and pytest_sessionfinish so the report's step assertions hold.
  • Tests: 5 pytester-driven cases (single parametrize, stacked decorators, fixture params, module boundary isolation, full parent chain) using a FakeReportContext that records the resulting step tree.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 16, 2026

Python docs preview: https://sift-stack.github.io/sift/python/pr-570/

Deployed from 0a50e80. The link may take up to a minute to become live as GitHub Pages propagates.

@alexluck-sift alexluck-sift changed the base branch from main to al/python/feat/pytest-dev-branch May 17, 2026 22:24
@alexluck-sift alexluck-sift changed the base branch from al/python/feat/pytest-dev-branch to al/python/graceful-handle-missing-connection May 17, 2026 22:27
@alexluck-sift alexluck-sift force-pushed the al/python/graceful-handle-missing-connection branch 2 times, most recently from 93cfa1c to 74b8b05 Compare May 18, 2026 00:04
@alexluck-sift alexluck-sift force-pushed the al/python/feat/pytest-parameterize-support branch from 5448db8 to 941d9c9 Compare May 18, 2026 00:25
@alexluck-sift alexluck-sift force-pushed the al/python/graceful-handle-missing-connection branch 3 times, most recently from 3ae545c to c403740 Compare May 19, 2026 15:22
@alexluck-sift alexluck-sift force-pushed the al/python/feat/pytest-parameterize-support branch from 941d9c9 to a4ba332 Compare May 19, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant