Implement C404 (#338)

This commit is contained in:
Harutaka Kawamura 2022-10-07 21:53:18 +09:00 committed by GitHub
parent d5b33cdb40
commit bd34850f98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 91 additions and 10 deletions

View file

@ -798,6 +798,18 @@ mod tests {
Ok(())
}
#[test]
fn c404() -> Result<()> {
let mut checks = check_path(
Path::new("./resources/test/fixtures/C404.py"),
&settings::Settings::for_rule(CheckCode::C404),
&fixer::Mode::Generate,
)?;
checks.sort_by_key(|check| check.location);
insta::assert_yaml_snapshot!(checks);
Ok(())
}
#[test]
fn spr001() -> Result<()> {
let mut checks = check_path(