=================================== FAILURES ===================================
_______________ test_python_exception_matches[(lambda: x := 1)] ________________
code = '(lambda: x := 1)'
@pytest.mark.parametrize('code', FAILING_EXAMPLES)
def test_python_exception_matches(code):
wanted, line_nr = _get_actual_exception(code)
errors = _get_error_list(code)
wanted, line_nr = _get_actual_exception(code) [50/1848]
errors = _get_error_list(code)
actual = None
if errors:
error, = errors
actual = error.message
> assert actual in wanted
E AssertionError: assert 'SyntaxError: cannot use named assignment with subscript' in ['SyntaxError: cannot use assignment expressions with subscript']
test/test_python_errors.py:39: AssertionError
__________________ test_python_exception_matches[(a(i) := x)] __________________
code = '(a(i) := x)'
@pytest.mark.parametrize('code', FAILING_EXAMPLES)
def test_python_exception_matches(code):
wanted, line_nr = _get_actual_exception(code)
errors = _get_error_list(code)
actual = None
if errors:
error, = errors
actual = error.message
> assert actual in wanted
E AssertionError: assert 'SyntaxError: cannot use named assignment with function call' in ['SyntaxError: cannot use assignment expressions with function call']
test/test_python_errors.py:39: AssertionError
__________________ test_python_exception_matches[(a.b := c)] ___________________
code = '(a.b := c)'
@pytest.mark.parametrize('code', FAILING_EXAMPLES)
def test_python_exception_matches(code):
wanted, line_nr = _get_actual_exception(code)
errors = _get_error_list(code)
actual = None
if errors:
error, = errors
actual = error.message
> assert actual in wanted
E AssertionError: assert 'SyntaxError: cannot use named assignment with attribute' in ['SyntaxError: cannot use assignment expressions with attribute']
test/test_python_errors.py:39: AssertionError
_____ test_python_exception_matches[[(i.i:= 0) for ((i), j) in range(5)]] ______
code = '[(i.i:= 0) for ((i), j) in range(5)]'
@pytest.mark.parametrize('code', FAILING_EXAMPLES)
def test_python_exception_matches(code):
wanted, line_nr = _get_actual_exception(code)
def test_python_exception_matches(code): [0/1848]
wanted, line_nr = _get_actual_exception(code)
errors = _get_error_list(code)
actual = None
if errors:
error, = errors
actual = error.message
> assert actual in wanted
E AssertionError: assert 'SyntaxError: cannot use named assignment with attribute' in ['SyntaxError: cannot use assignment expressions with attribute']
test/test_python_errors.py:39: AssertionError
________________ test_python_exception_matches[(await a := x)] _________________
code = '(await a := x)'
@pytest.mark.parametrize('code', FAILING_EXAMPLES)
def test_python_exception_matches(code):
wanted, line_nr = _get_actual_exception(code)
errors = _get_error_list(code)
actual = None
if errors:
error, = errors
actual = error.message
> assert actual in wanted
E AssertionError: assert 'SyntaxError: cannot use named assignment with await _expression_' in ['SyntaxError: cannot use assignment expressions with await _expression_
']
test/test_python_errors.py:39: AssertionError
_______________ test_python_exception_matches[((await a) := x)] ________________
code = '((await a) := x)'
@pytest.mark.parametrize('code', FAILING_EXAMPLES)
def test_python_exception_matches(code):
wanted, line_nr = _get_actual_exception(code)
errors = _get_error_list(code)
actual = None
if errors:
error, = errors
actual = error.message
> assert actual in wanted
E AssertionError: assert 'SyntaxError: cannot use named assignment with await _expression_' in ['SyntaxError: cannot use assignment expressions with await _expression_
']
test/test_python_errors.py:39: AssertionError
================== 9 failed, 1181 passed, 1 xfailed in 17.76s ==================
command "pytest" "-vv" failed with status 1
How should I solve it?