subtest
#[subtest] is a Rust macro to easily share test setup code between related test functions.
Example
How it works
statement copy
What you can do
- arbitrarily nest
- use async
- use rstest
- upgrade sync -> async
- omit attr, params, return type
What you can't do
- omit top-level test attr
- make async non-async again
- ambiguous assert macro import
- unused variables
Changelog
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.