Adding new stuff

This commit is contained in:
ViktorBarzin 2017-07-09 00:19:01 +03:00
parent a1687a2e5b
commit f8f54ab17a
1580 changed files with 205558 additions and 0 deletions

View file

@ -0,0 +1,13 @@
from jedi._compatibility import u
from jedi.parser import ParserWithRecovery, load_grammar
def test_basic_parsing():
def compare(string):
"""Generates the AST object and then regenerates the code."""
assert ParserWithRecovery(load_grammar(), string).module.get_code() == string
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'))