diff options
author | Darik Gamble <darik.gamble@gmail.com> | 2015-02-09 12:16:51 -0500 |
---|---|---|
committer | Darik Gamble <darik.gamble@gmail.com> | 2015-02-09 12:59:37 -0500 |
commit | 2f5e0b7476381f5fda9e240d6e0e4f9c35261211 (patch) | |
tree | 9fa334459b557de3017072b6a1c1bc2f546ad1e7 | |
parent | 4b13d3907fc0f6101a1a5dcf4a0f87ecca4dcdd2 (diff) | |
download | sqlparse-2f5e0b7476381f5fda9e240d6e0e4f9c35261211.tar.gz |
Fix test
Previously, in this test, "(select y from foo where bar = 1) z" was parsed as <Parens><Whitespace><Name z>.
It is now parsing as <Identifier alias z>, so change the nested token indexing to match
-rw-r--r-- | tests/test_grouping.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py index 23dba6d..33f44ae 100644 --- a/tests/test_grouping.py +++ b/tests/test_grouping.py @@ -146,7 +146,7 @@ class TestGrouping(TestCaseBase): s = 'select x from (select y from foo where bar = 1) z' p = sqlparse.parse(s)[0] self.ndiffAssertEqual(s, unicode(p)) - self.assertTrue(isinstance(p.tokens[-3].tokens[-2], sql.Where)) + self.assertTrue(isinstance(p.tokens[-1].tokens[0].tokens[-2], sql.Where)) def test_typecast(self): s = 'select foo::integer from bar' |