Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_errors_syntax fails with Python 3.13.0b2 #812

Open
mgorny opened this issue Jun 16, 2024 · 0 comments · May be fixed by #821
Open

test_errors_syntax fails with Python 3.13.0b2 #812

mgorny opened this issue Jun 16, 2024 · 0 comments · May be fixed by #821

Comments

@mgorny
Copy link

mgorny commented Jun 16, 2024

The following test seems to fail due to improved error messages in Python 3.13:

$ tox -e py313
py313: install_deps> python -I -m pip install flake8==6.1.0
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: _optional_hooks> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: prepare_metadata_for_build_wheel> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py313: install_package> python -I -m pip install --force-reinstall --no-deps /tmp/pyflakes/.tox/.tmp/package/1/pyflakes-3.2.0.tar.gz
py313: commands[0]> python --version --version
Python 3.13.0b2 (main, Jun 15 2024, 15:12:59) [GCC 14.1.1 20240516]
py313: commands[1]> python -m unittest discover pyflakes
..................F...........F...............................................s.................................s...............................................................................................s....................................................................................ss..s..........s....................s.........................................................................................................................................................................s............................................................................................s..........................................................................................................................ss..s..........s.
======================================================================
FAIL: test_errors_syntax (test.test_api.IntegrationTests.test_errors_syntax)
When pyflakes finds errors with the files it's given, (if they don't
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 779, in test_errors_syntax
    self.assertEqual(d, ('', error_msg, 1))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: ('', "/tmp/tmpbooyidpw/temp:1:7: Expected one [47 chars]", 1) != ('', '/tmp/tmpbooyidpw/temp:1:7: invalid synta[20 chars]', 1)

First differing element 1:
"/tmp/tmpbooyidpw/temp:1:7: Expected one [43 chars] ^\n"
'/tmp/tmpbooyidpw/temp:1:7: invalid synta[16 chars] ^\n'

+ ('', '/tmp/tmpbooyidpw/temp:1:7: invalid syntax\nimport\n      ^\n', 1)
- ('',
-  "/tmp/tmpbooyidpw/temp:1:7: Expected one or more names after 'import'\n"
-  'import\n'
-  '      ^\n',
-  1)

======================================================================
FAIL: test_errors_syntax (test.test_api.TestMain.test_errors_syntax)
When pyflakes finds errors with the files it's given, (if they don't
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pyflakes/pyflakes/test/test_api.py", line 779, in test_errors_syntax
    self.assertEqual(d, ('', error_msg, 1))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: ('', "/tmp/tmpc7279rn1/temp:1:7: Expected one [47 chars]", 1) != ('', '/tmp/tmpc7279rn1/temp:1:7: invalid synta[20 chars]', 1)

First differing element 1:
"/tmp/tmpc7279rn1/temp:1:7: Expected one [43 chars] ^\n"
'/tmp/tmpc7279rn1/temp:1:7: invalid synta[16 chars] ^\n'

+ ('', '/tmp/tmpc7279rn1/temp:1:7: invalid syntax\nimport\n      ^\n', 1)
- ('',
-  "/tmp/tmpc7279rn1/temp:1:7: Expected one or more names after 'import'\n"
-  'import\n'
-  '      ^\n',
-  1)

----------------------------------------------------------------------
Ran 732 tests in 1.227s

FAILED (failures=2, skipped=14)
py313: exit 1 (1.40 seconds) /tmp/pyflakes> python -m unittest discover pyflakes pid=1639266
  py313: FAIL code 1 (12.92=setup[11.52]+cmd[0.01,1.40] seconds)
  evaluation failed :( (13.22 seconds)
@eamanu eamanu linked a pull request Nov 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant