mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:53 +00:00
Implement C402 (#359)
This commit is contained in:
parent
473675fffb
commit
d9edec0ac9
7 changed files with 66 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue