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
FYI this is owned by libtest which is in the rust repo, and not cargo. We've also recently formed a testing-devex team to focus on improving the workflows around tests in a cross-team way.
As this is a fairly fundamental change, I would recommend experimenting in a library first for these ideas (pytest-rs is where my experiments live) and then bringing that proposal forward on internals.
However, this is unlikely to happen, directly. Last I talked to the libs team, we walked away with the idea that we'd work to make harness=false harnesses first class citizens and focus on feature development there, rather than in libtest. pytest-rs is my experiment towards that goal.
For myself, I see setup and teardown to be redundant with fixture and anti-patterns as they tend towards "god fixtuures" that encompass too much and slow down tests. The proposal given also doesn't provide a way to pass state from setup to the test to teardown and doesn't cover process-wide vs test-wide setup/teardown.
What about introducing new tests attributes for edition 2024 to allow global setup/teardown in tests ?
Something like
setup would run before all tests in its module and teardown after
The text was updated successfully, but these errors were encountered: