May-20-2020, 10:17 AM
Hello,
I am working on unix and using:
python/3.7.2/rh60_64
pycharm/2018.1.4/rh60_64
I have just installed pytest-5.4.2 and made it available though PYTHONPATH variable.
Through a test class on PyCharm I can, it seems sucessfully import pytest and for example use pytest.global_testName = ""
First, I do not have the py.tets binary in my unix environement, how to add it ? Then I have an issue within PyCharm, as described below.
Previoulsy I was using unitest as test runner, I would like to switch to py.test.
I tried to update PyCHarm settings and Run configurations as follow, without any success:
File/Settings/Tools/Python Integrated tools, I specified as "Defaut test runner" py.test, then OK.
PyCharm display a warning: No pytest runner found in selected interpreted
then:
Run/EditConfigurations/Defaults/Python tests/ I select py.test with "Custom" Target, then OK.
When I go to the testClass I have implemented, on the left side of the editor window, I can see "run py.test for ..." I execute that and the console simply displays, and it does not launch the test:
/sw/freetools/python/3.7.2/rh60_64/bin/python3.7 /prj/mms_nvm/cad_prj/python/users/paolipie/python/workdev/tests/com_st_envm_envmUtils/test_envmUtils.py
Process finished with exit code 0
I precise I cnanot use the pip installer, I have to download a python release package from windows then copy it into unix.
thanks a lot for any help,
Pierre
I am working on unix and using:
python/3.7.2/rh60_64
pycharm/2018.1.4/rh60_64
I have just installed pytest-5.4.2 and made it available though PYTHONPATH variable.
Through a test class on PyCharm I can, it seems sucessfully import pytest and for example use pytest.global_testName = ""
First, I do not have the py.tets binary in my unix environement, how to add it ? Then I have an issue within PyCharm, as described below.
Previoulsy I was using unitest as test runner, I would like to switch to py.test.
I tried to update PyCHarm settings and Run configurations as follow, without any success:
File/Settings/Tools/Python Integrated tools, I specified as "Defaut test runner" py.test, then OK.
PyCharm display a warning: No pytest runner found in selected interpreted
then:
Run/EditConfigurations/Defaults/Python tests/ I select py.test with "Custom" Target, then OK.
When I go to the testClass I have implemented, on the left side of the editor window, I can see "run py.test for ..." I execute that and the console simply displays, and it does not launch the test:
/sw/freetools/python/3.7.2/rh60_64/bin/python3.7 /prj/mms_nvm/cad_prj/python/users/paolipie/python/workdev/tests/com_st_envm_envmUtils/test_envmUtils.py
Process finished with exit code 0
I precise I cnanot use the pip installer, I have to download a python release package from windows then copy it into unix.
thanks a lot for any help,
Pierre