Use line_suffix for end-of-line comments (#2975)

This commit is contained in:
Charlie Marsh 2023-02-16 18:37:40 -05:00 committed by GitHub
parent 66a162fa40
commit 6088a36cd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 86 additions and 23 deletions

View file

@ -69,6 +69,7 @@ mod tests {
#[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/power_op_spacing.py"); "power_op_spacing")]
fn passing(path: &Path) -> Result<()> {
let snapshot = format!("{}", path.display());
let content = std::fs::read_to_string(test_resource_path(
@ -103,7 +104,8 @@ mod tests {
#[test_case(Path::new("simple_cases/expression.py"); "expression")]
#[test_case(Path::new("simple_cases/function.py"); "function")]
#[test_case(Path::new("simple_cases/function2.py"); "function2")]
#[test_case(Path::new("simple_cases/power_op_spacing.py"); "power_op_spacing")]
#[test_case(Path::new("simple_cases/function_trailing_comma.py"); "function_trailing_comma")]
#[test_case(Path::new("simple_cases/composition.py"); "composition")]
fn failing(path: &Path) -> Result<()> {
let snapshot = format!("{}", path.display());
let content = std::fs::read_to_string(test_resource_path(