From 468ffd29fb6a9905e20d2c479bd0c385d2c71f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=A4ufler?= Date: Tue, 20 Dec 2022 18:55:21 +0100 Subject: [PATCH] [Stylistic/non-functional] Use an r# format string to make json easier to read (#1299) --- tests/integration_test.rs | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 4b4f412626..6b5e1c538c 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -55,12 +55,33 @@ fn test_stdin_json() -> Result<()> { .failure(); assert_eq!( str::from_utf8(&output.get_output().stdout)?, - "[\n {\n \"code\": \"F401\",\n \"message\": \"`os` imported but unused\",\n \ - \"fix\": {\n \"content\": \"\",\n \"location\": {\n \"row\": 1,\n \ - \"column\": 0\n },\n \"end_location\": {\n \"row\": 2,\n \ - \"column\": 0\n }\n },\n \"location\": {\n \"row\": 1,\n \ - \"column\": 8\n },\n \"end_location\": {\n \"row\": 1,\n \"column\": \ - 10\n },\n \"filename\": \"F401.py\"\n }\n]\n" + r#"[ + { + "code": "F401", + "message": "`os` imported but unused", + "fix": { + "content": "", + "location": { + "row": 1, + "column": 0 + }, + "end_location": { + "row": 2, + "column": 0 + } + }, + "location": { + "row": 1, + "column": 8 + }, + "end_location": { + "row": 1, + "column": 10 + }, + "filename": "F401.py" + } +] +"# ); Ok(()) }