diff options
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/utils.py b/tests/utils.py index 9eb46bf..b596ff4 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -6,9 +6,9 @@ import codecs import difflib import os import unittest -from StringIO import StringIO import sqlparse.utils +from sqlparse.compat import u, StringIO NL = '\n' DIR_PATH = os.path.abspath(os.path.dirname(__file__)) @@ -31,8 +31,8 @@ class TestCaseBase(unittest.TestCase): def ndiffAssertEqual(self, first, second): """Like failUnlessEqual except use ndiff for readable output.""" if first != second: - sfirst = unicode(first) - ssecond = unicode(second) + sfirst = u(first) + ssecond = u(second) # Using the built-in .splitlines() method here will cause incorrect # results when splitting statements that have quoted CR/CR+LF # characters. @@ -42,5 +42,5 @@ class TestCaseBase(unittest.TestCase): fp = StringIO() fp.write(NL) fp.write(NL.join(diff)) - print fp.getvalue() - raise self.failureException, fp.getvalue() + # print(fp.getvalue()) + raise self.failureException(fp.getvalue()) |