Category : pytest

PermissionError: [WinError 5] Access is denied – running pytest after fresh conda install Environment # packages in environment at C:Usersrickminiconda3envsxml: # # Name Version Build Channel pytest 6.2.2 py39haa95532_2 (xml) c:Usersrick>conda info active environment : xml active env location : C:Usersrickminiconda3envsxml shell level : 2 user config file : C:Usersrick.condarc populated config files : C:Usersrick.condarc ..

Read more

When I add the switches to generate a coverage report using pytest it generates internal errors. I am running pytest in a .sh file by doing: pytest -x -v -s tests/$PYTHON_MODULE –cov=$PYTHON_MODULE –cov-report xml:/tmp/$PYTHON_MODULE-coverage.xml Changing this to remove the coverage switches the console properly outputs the test results. The working line of code is: pytest ..

Read more

I appreciate any help I can get. This is driving me crazy. pytest has been working for me forever. Today I did some reboots and now it doesn’t work. It always says it can’t find the file "and". PS C:> pytest ================================================= test session starts ================================================= platform win32 — Python 3.9.1, pytest-6.2.1, py-1.10.0, pluggy-0.13.1 rootdir: ..

Read more

I have the following project structure: o–src | |— | |— | … |–test |–pythonTestFolder1 |–pythonTestFolder2 |–C++GoogleTestFolder1 |–C++GoogleTestFolder1 When i go into test folder and start pytest from there to collect all tests at once, test folder is my working directory. Is there any way to set the working directory to each test i run? ..

Read more