Implement flake8-super check (#291)

This commit is contained in:
Nikita Sobolev 2022-09-30 16:12:09 +03:00 committed by GitHub
parent 5a1b6c32eb
commit 20989e12ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 104 additions and 3 deletions

View file

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