`test-env-log` used with `test-case` creates test duplicates
- Dominant language
- Rust
- Stars
- 633
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
> When I use the latest `test-case` and `test-log` (new name of `test-env-log`) together, I get duplicate copies of each test generated.
I also tried it with what I think were the versions from when this issue was created and have the same problem.
[Full example in this gist](https://gist.github.com/newsch/6ec5dfc835c355f7943f55d9c01d88f6#file-main-rs=)
```rust
#[cfg(test)]
mod tests {
use test_case::test_case;
#[test_case(0, 0 ; "the same")]
#[test_case(0, 1 ; "different")]
#[test_log::test]
// #[test_env_log::test]
fn equality(a: usize, b: usize) {
log::info!("a: {}", a);
log::info!("b: {}", b);
assert_eq!(a, b)
}
}
```
Output
```
running 4 tests
test tests::equality::the_same ... ok
test tests::equality::the_same ... ok
test tests::equality::different ... FAILED
test tests::equality::different ... FAILED
failures:
---- tests::equality::different stdout ----
thread 'tests::equality::different' panicked at 'assertion failed: `(left == right)`
left: `0`,
right: `1`', main.rs:18:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- tests::equality::different stdout ----
thread 'tests::equality::different' panicked at 'assertion failed: `(left == right)`
left: `0`,
right: `1`', main.rs:18:9
failures:
tests::equality::different
tests::equality::different
test result: FAILED. 2 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
error: test failed, to rerun pass '--bin main'
```
_Originally posted by @newsch in https://github.com/frondeus/test-case/issues/69#issuecomment-1167442635_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.