mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 03:02:52 +01:00
Fix syntax error in tests when run with Python 3.1 and 3.2.
This commit is contained in:
parent
0dc5160dbc
commit
744681d259
@ -72,9 +72,13 @@ class TokenizerTestCase(SupyTestCase):
|
||||
self.assertEqual(tokenize('foo "bar baz" quux'),
|
||||
['foo', 'bar baz', 'quux'])
|
||||
|
||||
_testUnicode = """
|
||||
def testUnicode(self):
|
||||
self.assertEqual(tokenize(u'好'), [u'好'])
|
||||
self.assertEqual(tokenize(u'"好"'), [u'好'])
|
||||
self.assertEqual(tokenize(u'"好"'), [u'好'])"""
|
||||
if sys.version_info[0] >= 3:
|
||||
_testUnicode = _testUnicode.replace("u'", "'")
|
||||
exec(_testUnicode)
|
||||
|
||||
def testNesting(self):
|
||||
self.assertEqual(tokenize('[]'), [[]])
|
||||
|
Loading…
Reference in New Issue
Block a user