Fix "ignoring test" warning with "cargo publish"

The rust_xlsxwriter crate has a lot of Excel xlsx files that are used for testing and that I would prefer to omit from the published package to reduce the size (-12MB):

$ du -hs tests/input
12M    tests/input

In order to do that I put the following exclude in Cargo.toml:

exclude = ["tests/**/*"]

That excludes the xlsx files for testing and also the integration test files but gives the following warning on cargo publish:

$ cargo publish --dry-run
    Updating crates.io index
   Packaging rust_xlsxwriter v0.92.2 (/path/rust/rust_xlsxwriter)

warning: ignoring test `integration` as `tests/integration/main.rs` 
         is not included in the published package

...

Is there a way to avoid this warning so that I only see other warnings before publishing?

You could move that to an unpublished crate in the same workspace.

The issue for this is Warnings for implicit tests and examples on cargo package/publish causes extra noise · Issue #14290 · rust-lang/cargo · GitHub

While I'm not seeing it in the thread, most likely we'd turn this into a lint after User control over cargo warnings · Issue #12235 · rust-lang/cargo · GitHub is resolved.