Check newline ending on contents directly (#365)

This commit is contained in:
Charlie Marsh 2022-10-08 17:25:22 -04:00 committed by GitHub
parent 5ccd907398
commit d0e1612507
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 30 deletions

View file

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