Use mod tests consistently (#5278)

As per the Rust documentation.
This commit is contained in:
Charlie Marsh 2023-06-21 21:50:28 -04:00 committed by GitHub
parent c0c59b82ec
commit 6b8b318d6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 7 deletions

View file

@ -445,7 +445,7 @@ impl Notebook {
}
#[cfg(test)]
mod test {
mod tests {
use std::path::Path;
use anyhow::Result;

View file

@ -126,7 +126,7 @@ pub(crate) fn remove_import_members(contents: &str, members: &[&str]) -> String
}
#[cfg(test)]
mod test {
mod tests {
use crate::rules::pyupgrade::fixes::remove_import_members;
#[test]

View file

@ -477,7 +477,7 @@ pub(crate) fn printf_string_formatting(
}
#[cfg(test)]
mod test {
mod tests {
use test_case::test_case;
use super::*;

View file

@ -299,7 +299,7 @@ pub(crate) fn init(path: &Path) -> Result<()> {
}
#[cfg(test)]
mod test {
mod tests {
use std::env::temp_dir;
use std::fs;
use std::io::{self, Write};

View file

@ -346,7 +346,7 @@ pub(crate) fn lint_stdin(
}
#[cfg(test)]
mod test {
mod tests {
use std::path::Path;
use crate::diagnostics::{load_jupyter_notebook, Diagnostics};

View file

@ -119,7 +119,7 @@ fn check_help_text() -> String {
}
#[cfg(test)]
mod test {
mod tests {
use anyhow::Result;
use crate::generate_all::Mode;

View file

@ -53,7 +53,7 @@ pub(crate) fn main(args: &Args) -> Result<()> {
}
#[cfg(test)]
mod test {
mod tests {
use anyhow::Result;
use std::env;