Closed markcty closed 1 year ago
If the following tests run together, it will fail:
#[cfg(test)] mod tests { use tracing::info; #[traced_test] #[test] fn no_log_from_other_test1() { info!("log count"); logs_assert(|lines: &[&str]| { match lines .iter() .filter(|line| line.contains("log count")) .count() { 1 => Ok(()), n => Err(format!("Count should be 1, but was {}", n)), } }); } #[traced_test] #[test] fn no_log_from_other_test2() { info!("log count"); logs_assert(|lines: &[&str]| { match lines .iter() .filter(|line| line.contains("log count")) .count() { 1 => Ok(()), n => Err(format!("Count should be 1, but was {}", n)), } }); } }
I don't know if this is intentional. I created a PR to fix this problem.
See https://github.com/dbrgn/tracing-test/pull/19
Fixed in #19.
If the following tests run together, it will fail:
I don't know if this is intentional. I created a PR to fix this problem.