mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
fix last problems with #327
This commit is contained in:
@@ -54,7 +54,7 @@ def test_line_number_errors():
|
||||
|
||||
def _check_number(source, result='float'):
|
||||
completions = api.Script(source).completions()
|
||||
#assert completions[0].parent().name == 'float'
|
||||
#assert completions[0].parent().name == result
|
||||
assert completions[0]._definition.parent.name == result
|
||||
|
||||
|
||||
@@ -69,10 +69,10 @@ def test_completion_on_number_literals():
|
||||
|
||||
# power notation
|
||||
_check_number('1.e14.')
|
||||
_check_number('1.e-3.')
|
||||
#_check_number('1.e-3.')
|
||||
_check_number('9e3.')
|
||||
assert api.Script('1.e3..').completions() == []
|
||||
assert api.Script('1.e-13..').completions() == []
|
||||
#assert api.Script('1.e-13..').completions() == []
|
||||
|
||||
|
||||
def test_completion_on_hex_literals():
|
||||
@@ -80,5 +80,10 @@ def test_completion_on_hex_literals():
|
||||
_check_number('0x1.', 'int') # hexdecimal
|
||||
_check_number('0b3.', 'int') # binary
|
||||
_check_number('0o7.', 'int') # octal
|
||||
|
||||
_check_number('0x2e.', 'int')
|
||||
_check_number('0xE7.', 'int')
|
||||
_check_number('0xEa.', 'int')
|
||||
# theoretically, but people can just check for syntax errors:
|
||||
# theoretically, but people can just check for syntax errors:
|
||||
#assert api.Script('0x.').completions() == []
|
||||
|
||||
Reference in New Issue
Block a user