From b701cca7796a0f5ef231b9386442fe5149a7ba13 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 20 Feb 2023 19:10:35 -0500 Subject: [PATCH] Enable some already-passing Black tests (#3079) --- crates/ruff_python_formatter/src/lib.rs | 5 ++++- ...tter__tests__simple_cases__one_element_subscript.py.snap} | 0 ...mple_cases__remove_newline_after_code_block_open.py.snap} | 0 ...ter__tests__simple_cases__tricky_unicode_symbols.py.snap} | 0 4 files changed, 4 insertions(+), 1 deletion(-) rename crates/ruff_python_formatter/src/snapshots/{expect/ruff_python_formatter__tests__simple_cases__one_element_subscript.py.snap.expect => ruff_python_formatter__tests__simple_cases__one_element_subscript.py.snap} (100%) rename crates/ruff_python_formatter/src/snapshots/{expect/ruff_python_formatter__tests__simple_cases__remove_newline_after_code_block_open.py.snap.expect => ruff_python_formatter__tests__simple_cases__remove_newline_after_code_block_open.py.snap} (100%) rename crates/ruff_python_formatter/src/snapshots/{expect/ruff_python_formatter__tests__simple_cases__tricky_unicode_symbols.py.snap.expect => ruff_python_formatter__tests__simple_cases__tricky_unicode_symbols.py.snap} (100%) diff --git a/crates/ruff_python_formatter/src/lib.rs b/crates/ruff_python_formatter/src/lib.rs index d1523bd207..d5b66a913e 100644 --- a/crates/ruff_python_formatter/src/lib.rs +++ b/crates/ruff_python_formatter/src/lib.rs @@ -65,12 +65,15 @@ mod tests { use crate::fmt; use crate::test::test_resource_path; + #[test_case(Path::new("simple_cases/beginning_backslash.py"); "beginning_backslash")] #[test_case(Path::new("simple_cases/class_blank_parentheses.py"); "class_blank_parentheses")] #[test_case(Path::new("simple_cases/class_methods_new_line.py"); "class_methods_new_line")] - #[test_case(Path::new("simple_cases/beginning_backslash.py"); "beginning_backslash")] #[test_case(Path::new("simple_cases/import_spacing.py"); "import_spacing")] + #[test_case(Path::new("simple_cases/one_element_subscript.py"); "one_element_subscript")] #[test_case(Path::new("simple_cases/power_op_spacing.py"); "power_op_spacing")] + #[test_case(Path::new("simple_cases/remove_newline_after_code_block_open.py"); "remove_newline_after_code_block_open")] #[test_case(Path::new("simple_cases/slices.py"); "slices")] + #[test_case(Path::new("simple_cases/tricky_unicode_symbols.py"); "tricky_unicode_symbols")] fn passing(path: &Path) -> Result<()> { let snapshot = format!("{}", path.display()); let content = std::fs::read_to_string(test_resource_path( diff --git a/crates/ruff_python_formatter/src/snapshots/expect/ruff_python_formatter__tests__simple_cases__one_element_subscript.py.snap.expect b/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__simple_cases__one_element_subscript.py.snap similarity index 100% rename from crates/ruff_python_formatter/src/snapshots/expect/ruff_python_formatter__tests__simple_cases__one_element_subscript.py.snap.expect rename to crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__simple_cases__one_element_subscript.py.snap diff --git a/crates/ruff_python_formatter/src/snapshots/expect/ruff_python_formatter__tests__simple_cases__remove_newline_after_code_block_open.py.snap.expect b/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__simple_cases__remove_newline_after_code_block_open.py.snap similarity index 100% rename from crates/ruff_python_formatter/src/snapshots/expect/ruff_python_formatter__tests__simple_cases__remove_newline_after_code_block_open.py.snap.expect rename to crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__simple_cases__remove_newline_after_code_block_open.py.snap diff --git a/crates/ruff_python_formatter/src/snapshots/expect/ruff_python_formatter__tests__simple_cases__tricky_unicode_symbols.py.snap.expect b/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__simple_cases__tricky_unicode_symbols.py.snap similarity index 100% rename from crates/ruff_python_formatter/src/snapshots/expect/ruff_python_formatter__tests__simple_cases__tricky_unicode_symbols.py.snap.expect rename to crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__simple_cases__tricky_unicode_symbols.py.snap