pub mod checks; pub mod types; #[cfg(test)] mod tests { use std::convert::AsRef; use std::path::Path; use anyhow::Result; use test_case::test_case; use crate::checks::CheckCode; use crate::linter::test_path; use crate::settings; #[test_case(CheckCode::T100, Path::new("T100.py"); "T100")] fn checks(check_code: CheckCode, path: &Path) -> Result<()> { let snapshot = format!("{}_{}", check_code.as_ref(), path.to_string_lossy()); let checks = test_path( Path::new("./resources/test/fixtures/flake8_debugger") .join(path) .as_path(), &settings::Settings::for_rule(check_code), )?; insta::assert_yaml_snapshot!(snapshot, checks); Ok(()) } }