diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2011-09-29 09:33:47 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2011-09-29 09:33:47 +0200 |
| commit | ff50b33074f5c276b0cff8094e85582dcd467095 (patch) | |
| tree | 6f34a60f9d7b62530bb65dfe0c4d7be8eb45abf7 /tests/test_parse.py | |
| parent | f811fa12247330adc27f1b842167a112b1c0829c (diff) | |
| download | sqlparse-ff50b33074f5c276b0cff8094e85582dcd467095.tar.gz | |
Make keyword detection more restrict (fixes issue47).
Keywords most likely don't follow dots. Maybe there are other
exclusions too, but for now let's just go with this one.
Diffstat (limited to 'tests/test_parse.py')
| -rw-r--r-- | tests/test_parse.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py index 5f9bb2d..e14c9e2 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -102,3 +102,7 @@ class SQLParseTest(TestCaseBase): self.assertEqual(t[-1].get_real_name(), '[foo bar]') self.assertEqual(t[-1].get_parent_name(), 'a') + def test_keyword_like_identifier(self): # see issue47 + t = sqlparse.parse('foo.key')[0].tokens + self.assertEqual(len(t), 1) + self.assert_(isinstance(t[0], sqlparse.sql.Identifier)) |
