Remove separate test files in favor of same-file mod tests (#9199)

## Summary

These were moved as part of a broader refactor to create a single
integration test module. That "single integration test module" did
indeed have a big impact on compile times, which is great! But we aren't
seeing any benefit from moving these tests into their own files (despite
the claim in [this blog
post](https://matklad.github.io/2021/02/27/delete-cargo-integration-tests.html),
I see the same compilation pattern regardless of where the tests are
located). Plus, we don't have many of these, and same-file tests is such
a strong Rust convention.
This commit is contained in:
Charlie Marsh 2024-11-18 15:11:46 -05:00 committed by GitHub
parent 747d69dc96
commit d08bfee718
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
114 changed files with 15321 additions and 15344 deletions

View file

@ -386,4 +386,24 @@ impl Visit for CollectOptionsVisitor {
}
#[cfg(test)]
mod tests;
mod tests {
use std::env;
use anyhow::Result;
use uv_static::EnvVars;
use crate::generate_all::Mode;
use super::{main, Args};
#[test]
fn test_generate_options_reference() -> Result<()> {
let mode = if env::var(EnvVars::UV_UPDATE_SCHEMA).as_deref() == Ok("1") {
Mode::Write
} else {
Mode::Check
};
main(&Args { mode })
}
}