-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
A-pytestArea: pytest-like framework implemented on top of the new harnessArea: pytest-like framework implemented on top of the new harnessC-enhancementCategory: Raise on the bar on expectationsCategory: Raise on the bar on expectations
Milestone
Description
The idea is to print pytest-like fixtures to Rust, like test-r and rustest do.
Fixtures should allow composable test setup and tear down
- Fixtures can take fixtures
- Fixtures can be paramaterized (Parametrized tests support #19)
- Fixtures can be ignored, causing dependent tests to be Skipped (
#[ignore]macro support #16) - Fixtures can panic, causing dependent tests to be Skipped (
#[should_panic]macro support #15) - Teardown is down through the type returned
- Like
rustest, we offer a teardown attribute. Should probably be nameddrop - Once we have generators in Rust, we could consider using those for setup/teardown phases
- Like
- Fixtures can be scoped to the parameter, test, or global
Differences from Pytest
- Like rustest, fixtures should be found by their type through the type system, rather than behind the scenes machinery like pytest.
- While fixtures can be parameterized (Parametrized tests support #19), fixtures can't enumerate parameters. Pytest allows parameterization through both markers and fixtures while we'll keep these separate. If nothing else, this will give a clear demarcation point for what runs during Discovery Phase (parameter discovery) vs Run Phase (fixtures)
Metadata
Metadata
Assignees
Labels
A-pytestArea: pytest-like framework implemented on top of the new harnessArea: pytest-like framework implemented on top of the new harnessC-enhancementCategory: Raise on the bar on expectationsCategory: Raise on the bar on expectations