Skip to content

Commit 4afb5da

Browse files
InSyncWithFooMichaReiser
authored andcommitted
Use inline snapshots in # noqa unit tests (#16687)
## Summary Follow-up to #16677. This change converts all unit tests (69 of them) in `noqa.rs` to use inline snapshots instead. It extends the file by more than 1000 lines, but the tests are now much easier to read and reason about. ## Test Plan `cargo insta test`.
1 parent b70743b commit 4afb5da

File tree

72 files changed

+1081
-1292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1081
-1292
lines changed

crates/ruff_linter/src/noqa.rs

Lines changed: 1081 additions & 69 deletions
Large diffs are not rendered by default.

crates/ruff_linter/src/snapshots/ruff_linter__linter__tests__undefined_name.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/ruff_linter/src/linter.rs
3-
snapshot_kind: text
43
---
54
undefined_name.ipynb:cell 3:1:7: F821 Undefined name `undefined`
65
|

crates/ruff_linter/src/snapshots/ruff_linter__linter__tests__unused_variable.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
source: crates/ruff_linter/src/linter.rs
3-
snapshot_kind: text
43
---
54
unused_variable.ipynb:cell 1:2:5: F841 [*] Local variable `foo1` is assigned to but never used
65
|

crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__flake8_exemption_all.snap

Lines changed: 0 additions & 16 deletions
This file was deleted.

crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__flake8_exemption_all_case_insensitive.snap

Lines changed: 0 additions & 16 deletions
This file was deleted.

crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__flake8_exemption_all_no_space.snap

Lines changed: 0 additions & 16 deletions
This file was deleted.

crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__flake8_exemption_codes.snap

Lines changed: 0 additions & 26 deletions
This file was deleted.

crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__flake8_malformed_code_1.snap

Lines changed: 0 additions & 7 deletions
This file was deleted.

crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__flake8_malformed_code_2.snap

Lines changed: 0 additions & 22 deletions
This file was deleted.

crates/ruff_linter/src/snapshots/ruff_linter__noqa__tests__flake8_malformed_code_3.snap

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)