mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
13 lines
365 B
Python
13 lines
365 B
Python
from jedi.parser import Parser, load_grammar
|
|
|
|
|
|
def test_basic_parsing():
|
|
def compare(string):
|
|
"""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')
|