diff options
| author | MrVallentin <vallentinsource@gmail.com> | 2018-11-01 13:03:12 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2019-01-07 10:46:39 +0100 |
| commit | d02339582f151d24bacefa636bc3955c2932c29f (patch) | |
| tree | 71c88ab9b422ac5ec9e3295dcb820b30b800c26f /tests/test_parse.py | |
| parent | 08cb6dab214dc638190c6e8f8d3b331b38bbd238 (diff) | |
| download | sqlparse-d02339582f151d24bacefa636bc3955c2932c29f.tar.gz | |
Revamped pprint_tree
Diffstat (limited to 'tests/test_parse.py')
| -rw-r--r-- | tests/test_parse.py | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py index 4fad526..f2a2bda 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -313,59 +313,59 @@ def test_pprint(): p._pprint_tree(f=output) pprint = '\n'.join([ - " 0 DML 'select'", - " 1 Whitespace ' '", - " 2 IdentifierList 'a0, b0...'", - " | 0 Identifier 'a0'", - " | | 0 Name 'a0'", - " | 1 Punctuation ','", - " | 2 Whitespace ' '", - " | 3 Identifier 'b0'", - " | | 0 Name 'b0'", - " | 4 Punctuation ','", - " | 5 Whitespace ' '", - " | 6 Identifier 'c0'", - " | | 0 Name 'c0'", - " | 7 Punctuation ','", - " | 8 Whitespace ' '", - " | 9 Identifier 'd0'", - " | | 0 Name 'd0'", - " | 10 Punctuation ','", - " | 11 Whitespace ' '", - " | 12 Float 'e0'", - " 3 Whitespace ' '", - " 4 Keyword 'from'", - " 5 Whitespace ' '", - " 6 Identifier '(selec...'", - " | 0 Parenthesis '(selec...'", - " | | 0 Punctuation '('", - " | | 1 DML 'select'", - " | | 2 Whitespace ' '", - " | | 3 Wildcard '*'", - " | | 4 Whitespace ' '", - " | | 5 Keyword 'from'", - " | | 6 Whitespace ' '", - " | | 7 Identifier 'dual'", - " | | | 0 Name 'dual'", - " | | 8 Punctuation ')'", - " | 1 Whitespace ' '", - " | 2 Identifier 'q0'", - " | | 0 Name 'q0'", - " 7 Whitespace ' '", - " 8 Where 'where ...'", - " | 0 Keyword 'where'", - " | 1 Whitespace ' '", - " | 2 Comparison '1=1'", - " | | 0 Integer '1'", - " | | 1 Comparison '='", - " | | 2 Integer '1'", - " | 3 Whitespace ' '", - " | 4 Keyword 'and'", - " | 5 Whitespace ' '", - " | 6 Comparison '2=2'", - " | | 0 Integer '2'", - " | | 1 Comparison '='", - " | | 2 Integer '2'", + "|- 0 DML 'select'", + "|- 1 Whitespace ' '", + "|- 2 IdentifierList 'a0, b0...'", + "| |- 0 Identifier 'a0'", + "| | `- 0 Name 'a0'", + "| |- 1 Punctuation ','", + "| |- 2 Whitespace ' '", + "| |- 3 Identifier 'b0'", + "| | `- 0 Name 'b0'", + "| |- 4 Punctuation ','", + "| |- 5 Whitespace ' '", + "| |- 6 Identifier 'c0'", + "| | `- 0 Name 'c0'", + "| |- 7 Punctuation ','", + "| |- 8 Whitespace ' '", + "| |- 9 Identifier 'd0'", + "| | `- 0 Name 'd0'", + "| |- 10 Punctuation ','", + "| |- 11 Whitespace ' '", + "| `- 12 Float 'e0'", + "|- 3 Whitespace ' '", + "|- 4 Keyword 'from'", + "|- 5 Whitespace ' '", + "|- 6 Identifier '(selec...'", + "| |- 0 Parenthesis '(selec...'", + "| | |- 0 Punctuation '('", + "| | |- 1 DML 'select'", + "| | |- 2 Whitespace ' '", + "| | |- 3 Wildcard '*'", + "| | |- 4 Whitespace ' '", + "| | |- 5 Keyword 'from'", + "| | |- 6 Whitespace ' '", + "| | |- 7 Identifier 'dual'", + "| | | `- 0 Name 'dual'", + "| | `- 8 Punctuation ')'", + "| |- 1 Whitespace ' '", + "| `- 2 Identifier 'q0'", + "| `- 0 Name 'q0'", + "|- 7 Whitespace ' '", + "`- 8 Where 'where ...'", + " |- 0 Keyword 'where'", + " |- 1 Whitespace ' '", + " |- 2 Comparison '1=1'", + " | |- 0 Integer '1'", + " | |- 1 Comparison '='", + " | `- 2 Integer '1'", + " |- 3 Whitespace ' '", + " |- 4 Keyword 'and'", + " |- 5 Whitespace ' '", + " `- 6 Comparison '2=2'", + " |- 0 Integer '2'", + " |- 1 Comparison '='", + " `- 2 Integer '2'", ""]) assert output.getvalue() == pprint |
