mirror of https://github.com/astral-sh/ruff
[Stylistic/non-functional] Use an r# format string to make json easier to read (#1299)
This commit is contained in:
parent
a61126ab23
commit
468ffd29fb
|
|
@ -55,12 +55,33 @@ fn test_stdin_json() -> Result<()> {
|
||||||
.failure();
|
.failure();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
str::from_utf8(&output.get_output().stdout)?,
|
str::from_utf8(&output.get_output().stdout)?,
|
||||||
"[\n {\n \"code\": \"F401\",\n \"message\": \"`os` imported but unused\",\n \
|
r#"[
|
||||||
\"fix\": {\n \"content\": \"\",\n \"location\": {\n \"row\": 1,\n \
|
{
|
||||||
\"column\": 0\n },\n \"end_location\": {\n \"row\": 2,\n \
|
"code": "F401",
|
||||||
\"column\": 0\n }\n },\n \"location\": {\n \"row\": 1,\n \
|
"message": "`os` imported but unused",
|
||||||
\"column\": 8\n },\n \"end_location\": {\n \"row\": 1,\n \"column\": \
|
"fix": {
|
||||||
10\n },\n \"filename\": \"F401.py\"\n }\n]\n"
|
"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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue