mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
Fix the errors for the old octal tests.
This commit is contained in:
@@ -85,7 +85,6 @@ def test_completion_on_hex_literals():
|
|||||||
# (invalid statements).
|
# (invalid statements).
|
||||||
assert api.Script('0b2.').completions() == []
|
assert api.Script('0b2.').completions() == []
|
||||||
_check_number('0b1.', 'int') # binary
|
_check_number('0b1.', 'int') # binary
|
||||||
_check_number('0o7.', 'int') # octal
|
|
||||||
|
|
||||||
_check_number('0x2e.', 'int')
|
_check_number('0x2e.', 'int')
|
||||||
_check_number('0xE7.', 'int')
|
_check_number('0xE7.', 'int')
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ test_grammar.py files from both Python 2 and Python 3.
|
|||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
|
|
||||||
from jedi._compatibility import unicode
|
from jedi._compatibility import unicode, is_py3
|
||||||
from jedi.parser import Parser, load_grammar, ParseError
|
from jedi.parser import Parser, load_grammar, ParseError
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
@@ -216,7 +216,11 @@ class TestSetLiteral(GrammarTest):
|
|||||||
|
|
||||||
class TestNumericLiterals(GrammarTest):
|
class TestNumericLiterals(GrammarTest):
|
||||||
def test_new_octal_notation(self):
|
def test_new_octal_notation(self):
|
||||||
parse("""0o7777777777777""")
|
code = """0o7777777777777"""
|
||||||
|
if is_py3:
|
||||||
|
parse(code)
|
||||||
|
else:
|
||||||
|
self.invalid_syntax(code)
|
||||||
self.invalid_syntax("""0o7324528887""")
|
self.invalid_syntax("""0o7324528887""")
|
||||||
|
|
||||||
def test_new_binary_notation(self):
|
def test_new_binary_notation(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user