Python 2.7 compatibility.

This commit is contained in:
Dave Halter
2015-01-13 02:12:49 +01:00
parent cc64265187
commit e6b9111749
8 changed files with 34 additions and 20 deletions

View File

@@ -1,3 +1,4 @@
from jedi._compatibility import u
from jedi.parser import Parser, load_grammar
@@ -6,7 +7,7 @@ def test_basic_parsing():
"""Generates the AST object and then regenerates the code."""
assert Parser(load_grammar(), string).module.get_code() == string
compare('\na #pass\n')
compare('wblabla* 1\t\n')
compare('def x(a, b:3): pass\n')
compare('assert foo\n')
compare(u('\na #pass\n'))
compare(u('wblabla* 1\t\n'))
compare(u('def x(a, b:3): pass\n'))
compare(u('assert foo\n'))