diff options
author | Adam Williamson <awilliam@redhat.com> | 2022-07-13 15:00:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 00:00:26 +0200 |
commit | c6f671b81da658cc3ba489097fadea40c8bd0f58 (patch) | |
tree | 5996a4a4c0daf637a59ee9bce124cfff00864c79 /tests/functional/s/syntax/syntax_error.py | |
parent | 4430e194c89b00c954f0fbda953b8215d2214ccc (diff) | |
download | pylint-git-c6f671b81da658cc3ba489097fadea40c8bd0f58.tar.gz |
Fix tests for Python 3.11 (#7167)
* Ignore deprecated-module in access_attr_before_def_false_positive
This is because telnetlib is deprecated in Python 3.11. It's
hard to see exactly what this is testing - there's no great
explanation in-line and the test predates the first commit to
the git repo so we don't have a commit message to help.
telnetlib will be removed in 3.13, though, so at that point
we'll have to figure it out or drop the telnetlib part of the
test.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
* Split asyncio.coroutine tests and set max_pyver 3.10 for them
iterable_context_py3 includes some checks that we don't emit
errors for asyncio.coroutine, but asyncio.coroutine has been
removed in Python 3.11, so we need to set a max version of
3.10 for these tests.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
* Set max_pyver 3.10 for some deprecations removed in 3.11
The `binhex` module and `binascii.b2a_hqx()` function, which
were deprecated in 3.9, are removed entirely in 3.11.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
* Change syntax_error test for consistent output
Python 3.11 changes the string representation of the
SyntaxError triggered by this test - it now says "expected '('"
instead of just "invalid syntax". This changes the test to use
a different error (incomplete `for` loop) which still has just
"invalid syntax" as its description in Python 3.11. This is the
same 'bad code' used in the similar `test_stdin_syntaxerror` in
the unit tests.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Diffstat (limited to 'tests/functional/s/syntax/syntax_error.py')
-rw-r--r-- | tests/functional/s/syntax/syntax_error.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/functional/s/syntax/syntax_error.py b/tests/functional/s/syntax/syntax_error.py index c93df6b05..a52040112 100644 --- a/tests/functional/s/syntax/syntax_error.py +++ b/tests/functional/s/syntax/syntax_error.py @@ -1 +1 @@ -def toto # [syntax-error] +for # [syntax-error] |