If newer versions are using Jedi (e.g. at the moment Python 3.7), it shouldn't just result in a grammar issue, just because that grammar doesn't not exist. Just take the Python 3.6 grammar instead.

This commit is contained in:
Dave Halter
2017-01-07 15:54:04 +01:00
parent aff3950085
commit 6d00a5702f
3 changed files with 21 additions and 2 deletions

View File

@@ -234,3 +234,12 @@ def test_python3_octal():
assert module.children[0].children[0].type == 'number'
else:
assert module.children[0].type == 'error_node'
def test_load_newer_grammar():
# This version shouldn't be out for a while, but if we somehow get this it
# should just take the latest Python grammar.
load_grammar('15.8')
# The same is true for very old grammars (even though this is probably not
# going to be an issue.
load_grammar('1.5')