-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
293 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
testsuite/tests/unparsing/raise_expr/long/doc-baseline.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"id": 7, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 6, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 0, | ||
"kind": "text", | ||
"text": "raise VeeeeeeeeeeeeryyyyyyyyLoooongNotImplementedError" | ||
}, | ||
{ | ||
"id": 5, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 4, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 3, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 1, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 2, | ||
"kind": "text", | ||
"text": "with \"a looooooooooooong too bad message\"" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
raise VeeeeeeeeeeeeryyyyyyyyLoooongNotImplementedError with "a looooooooooooong too bad message" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
raise VeeeeeeeeeeeeryyyyyyyyLoooongNotImplementedError | ||
with "a looooooooooooong too bad message" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: | | ||
This test checks the formatting of a raise expression | ||
with the line length exceeded. | ||
It is expected the expression breaks before the `with` | ||
keyword and the new line be indented. | ||
driver: unparser | ||
rule: raise_expr |
63 changes: 63 additions & 0 deletions
63
testsuite/tests/unparsing/raise_expr/short/doc-baseline.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"id": 7, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 6, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 0, | ||
"kind": "text", | ||
"text": "raise NotImplementedError" | ||
}, | ||
{ | ||
"id": 5, | ||
"kind": "command", | ||
"command": { | ||
"command": "align", | ||
"alignData": { | ||
"kind": "width", | ||
"n": 2 | ||
}, | ||
"alignContents": { | ||
"id": 4, | ||
"kind": "command", | ||
"command": { | ||
"command": "group", | ||
"id": 0, | ||
"groupContents": { | ||
"id": 3, | ||
"kind": "list", | ||
"list": [ | ||
{ | ||
"id": 1, | ||
"kind": "command", | ||
"command": { | ||
"command": "line", | ||
"literal": false, | ||
"soft": false, | ||
"hard": false | ||
} | ||
}, | ||
{ | ||
"id": 2, | ||
"kind": "text", | ||
"text": "with \"too bad\"" | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"break": false, | ||
"expandedStates": null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
raise NotImplementedError with "too bad" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
raise NotImplementedError with "too bad" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
description: | | ||
This test checks the formatting of a raise expression. | ||
It is expected the expression stays on a single line. | ||
driver: unparser | ||
rule: raise_expr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
testsuite/tests/unparsing/raise_stmt/long_with_expr_and_message/test.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
raise VeeeeeeeeeeeeryyyyyyyyLoooongNotImplementedError with | ||
"a looooooooooooong too bad message"; | ||
raise VeeeeeeeeeeeeryyyyyyyyLoooongNotImplementedError | ||
with "a looooooooooooong too bad message"; |
4 changes: 2 additions & 2 deletions
4
testsuite/tests/unparsing/raise_stmt/long_with_expr_and_message/test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
description: | | ||
This test checks the formatting of a raise statement | ||
with the line length exceeded. | ||
It is expected the statement breaks after `with` keyword | ||
and the new line is indented. | ||
It is expected the statement breaks before the `with` | ||
keyword and the new line be indented. | ||
driver: unparser | ||
rule: raise_stmt |
Oops, something went wrong.