Pytest connection

Getting below error when tried to execute “pytest -m connection”. Where as “python run.py” is successful and completed test on status page.

(mflix) C:\Users\User\mflix-python>pytest -m connection
Traceback (most recent call last):
File “f:\programfiles\anaconda\lib\runpy.py”, line 193, in _run_module_as_main

"__main__", mod_spec)

File “f:\programfiles\anaconda\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "F:\ProgramFiles\Anaconda\Scripts\pytest.exe_main
.py", line 5, in
File “f:\programfiles\anaconda\lib\site-packages\pytest.py”, line 13, in
from _pytest.fixtures import fixture, yield_fixture
File “f:\programfiles\anaconda\lib\site-packages_pytest\fixtures.py”, line 83
9, in
class FixtureFunctionMarker(object):
File “f:\programfiles\anaconda\lib\site-packages_pytest\fixtures.py”, line 84
1, in FixtureFunctionMarker
params = attr.ib(convert=attr.converters.optional(tuple))
TypeError: attrib() got an unexpected keyword argument ‘convert’

Please check this link
May help

[Solution] TypeError: attrib() got an unexpected keyword argument ‘convert’

Hi @Anupama_54080,

Let me know if the issue is not resolved.

Kanika

Hi Guys in the requirements.txt the version for pytest will be 3.3.0 please change it to 5.3.2 and install the packages again (pip install -r requirements.txt) and all works expected!

1 Like