You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pytest is 6.2.4, and the OS is Linux saif-kubuntu 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux, with python 3.8.5.
cd~
mkdir pytest_bug_report &&cd pytest_bug_report
virtualenv -m venv venv
source venv/bin/activate
pip install pytest
pytest --version # this also generates the error for some reason
The error thrown is,
Traceback (most recent call last):
File "/home/saif/.local/bin/pytest", line 5, in <module>
from pytest import main
File "/home/saif/.local/lib/python3.8/site-packages/pytest.py", line 13, in <module>
from _pytest.fixtures import fixture, yield_fixture
File "/home/saif/.local/lib/python3.8/site-packages/_pytest/fixtures.py", line 839, in <module>
class FixtureFunctionMarker(object):
File "/home/saif/.local/lib/python3.8/site-packages/_pytest/fixtures.py", line 841, in FixtureFunctionMarker
params = attr.ib(convert=attr.converters.optional(tuple))
TypeError: attrib() got an unexpected keyword argument 'convert'
File "/home/saif/.local/lib/python3.8/site-packages/_pytest/fixtures.py", line 841, in FixtureFunctionMarker
params = attr.ib(convert=attr.converters.optional(tuple))
I did not realize that. Thank for you pointing that out!
For some reason, even despite that, I had my virtualenv activated, when I ran pytest, it ran the pytest installed globally, which was a long time ago. I just did pip install -U pytest, and found that a 1.8.0 was residing globally. I updated it to the latest. And with that, it works now.
This was completely my fault, fixed it now. Thank for you the time, though.
Uh oh!
There was an error while loading. Please reload this page.
Detailed Description
PyTest will not install and is throwing an error when ran for tests, that is
pytest
.Pip Freeze
PyTest And OS Versions
pytest
is6.2.4
, and the OS isLinux saif-kubuntu 5.4.0-77-generic #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
, with python3.8.5
.Minimal working example
Running the code below will generate the error,
Or even simply,
The error thrown is,
Yes, I've looked at similar issues, such as,
The bottom line solution is to have the latest
pytest
, andattrs
, I have both at21.2.0
, and at6.2.4
.The text was updated successfully, but these errors were encountered: