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_version: flake8 plugins not normalized #558

Open
bnavigator opened this issue Feb 27, 2024 · 1 comment · May be fixed by #559
Open

test_version: flake8 plugins not normalized #558

bnavigator opened this issue Feb 27, 2024 · 1 comment · May be fixed by #559

Comments

@bnavigator
Copy link

Python Version

3.9.18

flake8 Version

7.0.0

Package Version

3.14.0

Description

I am not sure what changed in our setup but we encounter a silly test failure since January 2 (which was before the release of flake8 7.0.0)

[   18s] =================================== FAILURES ===================================
[   18s] _________________________________ test_version _________________________________
[   18s] [gw0] linux -- Python 3.9.18 /usr/bin/python3.9
[   18s] 
[   18s] flake8_path = Flake8Path('/tmp/pytest-of-abuild/pytest-0/popen-gw0/flake8_path22')
[   18s] 
[   18s]     def test_version(flake8_path):
[   18s]         result = flake8_path.run_flake8(["--version"])
[   18s]         version_regex = r"flake8-comprehensions:( )*" + version("flake8-comprehensions")
[   18s]         unwrapped = "".join(result.out_lines)
[   18s] >       assert re.search(version_regex, unwrapped)
[   18s] E       AssertionError: assert None
[   18s] E        +  where None = <function search at 0x7fd86c6ad0d0>('flake8-comprehensions:( )*3.14.0', '7.0.0 (flake8_comprehensions: 3.14.0, mccabe: 0.7.0, pycodestyle: 2.11.1,pyflakes: 3.2.0) CPython 3.9.18 on Linux')
[   18s] E        +    where <function search at 0x7fd86c6ad0d0> = re.search
[   18s] 
[   18s] tests/test_flake8_comprehensions.py:27: AssertionError
[   18s] =========================== short test summary info ============================
[   18s] FAILED tests/test_flake8_comprehensions.py::test_version - AssertionError: as...
[   18s] ======================== 1 failed, 137 passed in 5.04s =========================
@bnavigator bnavigator linked a pull request Feb 27, 2024 that will close this issue
@adamchainz
Copy link
Owner

I don’t generally support running the tests outside of the tox setup within the repo.

I would consider merging a fix if you could explain why the name is changed. Afaiu flake8 pluus the name from the name attribute, which is a fixed string:

name = "flake8-comprehensions"

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.

2 participants