env-lock
A process's environment is a form of global mutable state. In Rust, tests are run in a shared process. This means tests that modify environment variables can inadvertently affect each other. env-lock provides a simple interface to safely modify and lock the process environment, to prevent simultaneous access. This provides two forms of isolation: isolation from the external environment, and isolation between tests that read/modify the environment.
use env;
let var = "ENV_LOCK_TEST_VARIABLE";
assert!;
let guard = lock_env;
assert_eq!;
drop;
assert!;