diff --git a/src/filesystem.rs b/src/filesystem.rs index 27ebf96..ac7b395 100644 --- a/src/filesystem.rs +++ b/src/filesystem.rs @@ -472,13 +472,26 @@ mod test { use std::io::Write; use tempfile::TempDir; + use std::sync::Once; + + static INIT: Once = Once::new(); + + pub fn initialize() { + INIT.call_once(|| { + let env = env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"); + env_logger::init_from_env(env); + }); + } + #[test] fn test_rescan_quick() { + initialize(); _test_rescan(true) } #[test] fn test_rescan_full() { + initialize(); _test_rescan(false) }