diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2015-10-26 19:40:29 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2015-10-26 19:40:29 +0100 |
| commit | e6a51a0bc3f87e284de74cec838d3ee98c2f9cf5 (patch) | |
| tree | 8ac469820a09c31e9e49543ecbbbdeebad53c85e /tests/test_tokenize.py | |
| parent | 8bfdaf3cc37ffe48a60c7f4ee5d5e99d0b07e696 (diff) | |
| download | sqlparse-e6a51a0bc3f87e284de74cec838d3ee98c2f9cf5.tar.gz | |
Use compat module for single Python 2/3 code base.
This change includes minor fixes and code cleanup too.
Diffstat (limited to 'tests/test_tokenize.py')
| -rw-r--r-- | tests/test_tokenize.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/test_tokenize.py b/tests/test_tokenize.py index 0b23fa8..ceaf24e 100644 --- a/tests/test_tokenize.py +++ b/tests/test_tokenize.py @@ -9,6 +9,7 @@ import pytest import sqlparse from sqlparse import lexer from sqlparse import sql +from sqlparse.compat import StringIO from sqlparse.tokens import * @@ -133,8 +134,6 @@ class TestTokenList(unittest.TestCase): class TestStream(unittest.TestCase): def test_simple(self): - from cStringIO import StringIO - stream = StringIO("SELECT 1; SELECT 2;") lex = lexer.Lexer() @@ -152,8 +151,6 @@ class TestStream(unittest.TestCase): self.assertEqual(len(tokens), 9) def test_error(self): - from cStringIO import StringIO - stream = StringIO("FOOBAR{") lex = lexer.Lexer() |
