mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
Move a parser test to the correct place.
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
from jedi._compatibility import u
|
|
||||||
from jedi.parser.python import parse
|
|
||||||
|
|
||||||
|
|
||||||
def test_basic_parsing():
|
|
||||||
def compare(string):
|
|
||||||
"""Generates the AST object and then regenerates the code."""
|
|
||||||
assert parse(string).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'))
|
|
||||||
@@ -13,6 +13,16 @@ from jedi.parser_utils import get_statement_of_position, \
|
|||||||
clean_scope_docstring, safe_literal_eval
|
clean_scope_docstring, safe_literal_eval
|
||||||
|
|
||||||
|
|
||||||
|
def test_basic_parsing():
|
||||||
|
def compare(string):
|
||||||
|
"""Generates the AST object and then regenerates the code."""
|
||||||
|
assert parse(string).get_code() == string
|
||||||
|
|
||||||
|
compare('\na #pass\n')
|
||||||
|
compare('wblabla* 1\t\n')
|
||||||
|
compare('def x(a, b:3): pass\n')
|
||||||
|
compare('assert foo\n')
|
||||||
|
|
||||||
def test_user_statement_on_import():
|
def test_user_statement_on_import():
|
||||||
"""github #285"""
|
"""github #285"""
|
||||||
s = "from datetime import (\n" \
|
s = "from datetime import (\n" \
|
||||||
|
|||||||
Reference in New Issue
Block a user