From c58997de1c933d2716b8c4af18caac635458f56b Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Sat, 4 Jan 2025 12:15:09 +0100 Subject: [PATCH] Remove try_fix CLI tests --- crates/ruff/tests/integration_test.rs | 64 --------------------------- 1 file changed, 64 deletions(-) diff --git a/crates/ruff/tests/integration_test.rs b/crates/ruff/tests/integration_test.rs index 6001cc90452bd..bae45dd22f78a 100644 --- a/crates/ruff/tests/integration_test.rs +++ b/crates/ruff/tests/integration_test.rs @@ -2126,67 +2126,3 @@ unfixable = ["RUF"] Ok(()) } - -#[test] -fn verbose_show_failed_fix_errors() { - let mut cmd = RuffCheck::default() - .args(["--select", "UP006", "--preview", "-v"]) - .build(); - - insta::with_settings!( - { - // the logs have timestamps we need to remove - filters => vec![( - r"\[[\d:-]+]", - "" - )] - },{ - assert_cmd_snapshot!(cmd - .pass_stdin("import typing\nCallable = 'abc'\ndef g() -> typing.Callable: ..."), - @r###" - success: false - exit_code: 1 - ----- stdout ----- - -:3:12: UP006 Use `collections.abc.Callable` instead of `typing.Callable` for type annotation - | - 1 | import typing - 2 | Callable = 'abc' - 3 | def g() -> typing.Callable: ... - | ^^^^^^^^^^^^^^^ UP006 - | - = help: Replace with `collections.abc.Callable` - - Found 1 error. - - ----- stderr ----- - [ruff::resolve][DEBUG] Isolated mode, not reading any pyproject.toml - [ruff_diagnostics::diagnostic][DEBUG] Failed to create fix for NonPEP585Annotation: Unable to insert `Callable` into scope due to name conflict - "###); } - ); -} - -#[test] -fn no_verbose_hide_failed_fix_errors() { - let mut cmd = RuffCheck::default() - .args(["--select", "UP006", "--preview"]) - .build(); - assert_cmd_snapshot!(cmd - .pass_stdin("import typing\nCallable = 'abc'\ndef g() -> typing.Callable: ..."), - @r###" - success: false - exit_code: 1 - ----- stdout ----- - -:3:12: UP006 Use `collections.abc.Callable` instead of `typing.Callable` for type annotation - | - 1 | import typing - 2 | Callable = 'abc' - 3 | def g() -> typing.Callable: ... - | ^^^^^^^^^^^^^^^ UP006 - | - = help: Replace with `collections.abc.Callable` - - Found 1 error. - - ----- stderr ----- - "###); -}