Implement C402 (#359)

This commit is contained in:
Harutaka Kawamura 2022-10-08 11:57:04 +09:00 committed by GitHub
parent 473675fffb
commit d9edec0ac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 66 additions and 1 deletions

View file

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