Ignore Python 2 specific code in tests

This commit is contained in:
Dave Halter
2020-07-25 01:41:33 +02:00
parent 7c68ba4c45
commit 6eb6ac0bb2
5 changed files with 7 additions and 45 deletions

View File

@@ -136,12 +136,7 @@ def test_identifier_contains_unicode():
''')
token_list = _get_token_list(fundef)
unicode_token = token_list[1]
if sys.version_info.major >= 3:
assert unicode_token[0] == NAME
else:
# Unicode tokens in Python 2 seem to be identified as operators.
# They will be ignored in the parser, that's ok.
assert unicode_token[0] == ERRORTOKEN
assert unicode_token[0] == NAME
def test_quoted_strings():