mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-08 13:45:01 +08:00
Add issue 'duplicate argument '%s' in function definition'
This commit is contained in:
@@ -101,6 +101,9 @@ def test_indentation_errors(code, positions):
|
||||
'f(**x, *y)',
|
||||
'f(**x, y=3, z)',
|
||||
|
||||
# SyntaxErrors from Python/symtable.c
|
||||
'def f(x, x): pass',
|
||||
|
||||
# IndentationError
|
||||
' foo',
|
||||
'def x():\n 1\n 2',
|
||||
@@ -121,8 +124,11 @@ def test_python_exception_matches(code):
|
||||
if sys.version_info[:2] == (2, 6) and wanted == 'SyntaxError: unexpected EOF while parsing':
|
||||
wanted = 'SyntaxError: invalid syntax'
|
||||
|
||||
error, = _get_error_list(code)
|
||||
assert wanted == error.message
|
||||
errors = _get_error_list(code)
|
||||
actual = None
|
||||
if errors:
|
||||
actual = errors[0].message
|
||||
assert wanted == actual
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in New Issue
Block a user