summaryrefslogtreecommitdiff
path: root/tests/test_tokenize.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2009-05-06 18:50:27 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2009-05-06 18:50:27 +0200
commit01b2e8f15c57296bb14d7d56242fca641bcbcebe (patch)
tree9c07ff9aa40bb891d54ed729b403f5f4b80f88a1 /tests/test_tokenize.py
parent974222bcb24a5b2bf3a0e5ecd616a2c3855e8342 (diff)
downloadsqlparse-01b2e8f15c57296bb14d7d56242fca641bcbcebe.tar.gz
* Python and PHP output filter now add a trailing whitespace.
* More test coverage.
Diffstat (limited to 'tests/test_tokenize.py')
-rw-r--r--tests/test_tokenize.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_tokenize.py b/tests/test_tokenize.py
index e4ef6c3..690ef31 100644
--- a/tests/test_tokenize.py
+++ b/tests/test_tokenize.py
@@ -66,6 +66,11 @@ class TestToken(unittest.TestCase):
class TestTokenList(unittest.TestCase):
+ def test_repr(self):
+ p = sqlparse.parse('foo, bar, baz')[0]
+ tst = "<IdentifierList 'foo, b...' at 0x"
+ self.assertEqual(repr(p.tokens[0])[:len(tst)], tst)
+
def test_token_first(self):
p = sqlparse.parse(' select foo')[0]
first = p.token_first()