From 954f48431a0fe8ea1749ba0236da23a705bf3b75 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sat, 4 Jun 2016 15:08:40 -0700 Subject: Redo unicode-encoding on lexer.py --- tests/test_split.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/test_split.py') diff --git a/tests/test_split.py b/tests/test_split.py index f6d5f50..7c2645d 100644 --- a/tests/test_split.py +++ b/tests/test_split.py @@ -133,6 +133,11 @@ class SQLSplitTest(TestCaseBase): stmts = list(sqlparse.parsestream(stream)) self.assertEqual(type(stmts[0].tokens[0].value), text_type) + def test_unicode_parsestream(self): + stream = StringIO(u"SELECT ö") + stmts = list(sqlparse.parsestream(stream)) + self.assertEqual(str(stmts[0]), "SELECT ö") + def test_split_simple(): stmts = sqlparse.split('select * from foo; select * from bar;') -- cgit v1.2.1