fix last problems with #327

This commit is contained in:
Dave Halter
2014-04-07 14:43:46 +02:00
parent b48d0bf622
commit 484ace2cfd
2 changed files with 12 additions and 10 deletions

View File

@@ -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() == []