mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-09 21:42:20 +08:00
Fix some code_lines issues
This commit is contained in:
@@ -165,7 +165,7 @@ def test_get_line_code(Script):
|
||||
# On custom code
|
||||
first_line = 'def foo():\n'
|
||||
line = ' foo'
|
||||
code = '%s%s' % (first_line, line)
|
||||
code = first_line + line
|
||||
assert get_line_code(code) == first_line
|
||||
|
||||
# With before/after
|
||||
|
||||
@@ -84,5 +84,5 @@ def test_namedtuple_goto_definitions(Script):
|
||||
|
||||
d1, = Script(source).goto_definitions()
|
||||
|
||||
assert d1.get_line_code() == "class Foo(tuple):"
|
||||
assert d1.get_line_code() == "class Foo(tuple):\n"
|
||||
assert d1.module_path is None
|
||||
|
||||
Reference in New Issue
Block a user