diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2020-09-30 15:30:00 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2020-09-30 15:30:00 +0200 |
| commit | f578d03ef7a0d1b0f84c59c4699ee307e725fc9c (patch) | |
| tree | f16fc65a026eb2940c442efd5d06d2ae9b6e37ff /tests | |
| parent | 10231d89d76cb467729fb7391c6a80938d6c5f76 (diff) | |
| download | sqlparse-f578d03ef7a0d1b0f84c59c4699ee307e725fc9c.tar.gz | |
Improve formatting of type casts in parentheses.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_regressions.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_regressions.py b/tests/test_regressions.py index 648cc4a..13c752b 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -399,3 +399,9 @@ def test_issue489_tzcasts(): p = sqlparse.parse('select bar at time zone \'UTC\' as foo')[0] assert p.tokens[-1].has_alias() is True assert p.tokens[-1].get_alias() == 'foo' + + +def test_as_in_parentheses_indents(): + # did raise NoneType has no attribute is_group in _process_parentheses + formatted = sqlparse.format('(as foo)', reindent=True) + assert formatted == '(as foo)' |
