mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:52:01 +00:00
Add Semantic Error Test for LateFutureImport (#17612)
Adresses a question in #17526. ## Summary Adds a syntax error test for `__future__` import not at top of file. ## Question: Is this a redundant with8d2c79276d/crates/ruff_linter/resources/test/fixtures/pyflakes/F404_0.py (L1-L8)
and8d2c79276d/crates/ruff_linter/resources/test/fixtures/pyflakes/F404_1.py (L1-L5)
which test pyflake `F404`? <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan This is a test <!-- How was it tested? -->
This commit is contained in:
parent
afc18ff1a1
commit
3f84e75e20
3 changed files with 12 additions and 0 deletions
|
@ -1062,6 +1062,7 @@ mod tests {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[test_case(Rule::LateFutureImport, Path::new("late_future_import.py"))]
|
||||
#[test_case(Rule::YieldOutsideFunction, Path::new("yield_scope.py"))]
|
||||
#[test_case(Rule::ReturnOutsideFunction, Path::new("return_outside_function.py"))]
|
||||
#[test_case(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue