per_test_directory
This crate introduces an attribute macro
#[per_test_directory]
that will create a directory test_runs/module_name.test_function_name
and change the current working directory to it while running.
If the test is successful, the directory is removed. Otherwise, it is being kept for your inspection. Either way, the current directory is reset after the test run.
Example: