pycodestyle 2.10 breaks autopep8 tests
bjornfor opened this issue · comments
Bjørn Forsman commented
Hi,
I'm a package maintainer of autopep8 in Nixpkgs, and since the upgrade of pycodestyle 2.9.1 -> 2.10, autopep8 fails to build like this:
$ cd nixpkgs
$ git checkout 3a2e1fcdd319f5bb4dce8b69abafc1fd0635079d
$ nix-build -A python3Packages.autopep8
[...]
============================= test session starts ==============================
platform linux -- Python 3.10.8, pytest-7.1.3, pluggy-1.0.0
rootdir: /build/autopep8-2.0.0
collected 599 items / 1 deselected / 598 selected
test/test_autopep8.py .................................................. [ 8%]
........................................................................ [ 20%]
........................................................................ [ 32%]
........................................................................ [ 44%]
........................................................................ [ 56%]
........................................................................ [ 68%]
..............FFFFFF.sF.FFFFFFFF...F.FFFF............................... [ 80%]
.........................................s.............................. [ 92%]
........s................................... [100%]
=================================== FAILURES ===================================
_____________________ SystemTests.test_w602_arg_is_string ______________________
self = <test.test_autopep8.SystemTests testMethod=test_w602_arg_is_string>
def test_w602_arg_is_string(self):
line = "raise ValueError, \"w602 test\"\n"
fixed = "raise ValueError(\"w602 test\")\n"
with autopep8_context(line, options=['--aggressive']) as result:
> self.assertEqual(fixed, result)
E AssertionError: 'raise ValueError("w602 test")\n' != 'raise ValueError, "w602 test"\n'
E - raise ValueError("w602 test")
E ? ^ -
E + raise ValueError, "w602 test"
E ? ^^
test/test_autopep8.py:4940: AssertionError
[...many similar looking failures...]
Changelog for pycodestyle: https://github.com/PyCQA/pycodestyle/blob/2.10.0/CHANGES.txt
Nixpkgs issue: NixOS/nixpkgs#205733
Your Environment
- Python version: 3.10
- autopep8 version: 2.0.0
- Platform: windows, Linux / Nixpkgs
Lily Foster commented
Bjørn Forsman commented
@lilyinstarlight: thanks, closing then.
Hideo Hattori commented
Thanks for reporting.
We have released version 2.0.1, which fixes this problem.