Why is one of the tests filtered out?

└── allergies/
    ├── src/
    │   ├── bitset.rs
    │   └── lib.rs
    ├── tests/
    │   └── allergies.rs
    └── Cargo.toml

bitset.rs has a unit test module:

mod tests {

allergies.rs doesn't declare any modules. lib.rs declares mod bitset.

When I run tests from rust using the command cargo test --all-features --manifest-path "allergies/Cargo.toml" -- --ignored --show-output, it only runs tests from allergies.rs, not the tests from bitset.rs. I can run tests from bitset.rs specifically by using the path bitset::tests, but I want to be able to run them all at once.

Running unittests src/lib.rs (allergies/target/debug/deps/allergies-8c0a619c2e4cbbc2)

running 0 tests
// snip
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.00s

I figured it out. Replacing --ignored with --include-ignored does the trick.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.