PyCQA / pycodestyle

Simple Python style checker in one Python file

Home Page:https://pycodestyle.pycqa.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test_check_nullbytes regressed on 3.11.4

mweinelt opened this issue · comments

We've updated python311 from 3.11.3 to 3.11.4 and now the following test has regressed. Works fine on 3.10.12 though.

pycodestyle-aarch64-linux> FAIL: test_check_nullbytes (test_api.APITestCase.test_check_nullbytes)
pycodestyle-aarch64-linux> ----------------------------------------------------------------------
pycodestyle-aarch64-linux> Traceback (most recent call last):
pycodestyle-aarch64-linux>   File "/build/pycodestyle-2.10.0/testsuite/test_api.py", line 333, in test_check_nullbytes
pycodestyle-aarch64-linux>     self.assertTrue(stdout.startswith(expected),
pycodestyle-aarch64-linux> AssertionError: False is not true : Output 'stdin:1:1: E901 SyntaxError: source code string cannot contain null bytes\n' does not start with 'stdin:1:1: E901 ValueError'
pycodestyle-aarch64-linux> 

next time please try the latest revision

Fails on 54b053e all the same. You created a special case for 3.12, but this is 3.11.4.

stdout = sys.stdout.getvalue()
if sys.version_info < (3, 12):
expected = "stdin:1:1: E901 ValueError"
else:
expected = "stdin:1:1: E901 SyntaxError: source code string cannot contain null bytes" # noqa: E501
self.assertTrue(stdout.startswith(expected),

commented

Fails on 54b053e all the same. You created a special case for 3.12, but this is 3.11.4.

stdout = sys.stdout.getvalue()
if sys.version_info < (3, 12):
expected = "stdin:1:1: E901 ValueError"
else:
expected = "stdin:1:1: E901 SyntaxError: source code string cannot contain null bytes" # noqa: E501
self.assertTrue(stdout.startswith(expected),

Changes was backported to 3.11: python/cpython#104195
Currently we have a bug report in Debian (Python 3.11 in stable, testing and sid ATM).

@s3v- you're trying to build 2.10 which is relatively old -- you'd probably have a better time with latest