python - Able to run Pytest from PyCharm but not through Command Line -


i trying on ubuntu. when run pytest pycharm worked when tried run same command getting different errors. surely not building command correctly.

so here looks in pycharm

target = /some_path/test_xxx.py     options= --server ### -s --browser firefox --html=report.html  

and below have tried on shell

lab-automation:~/my_folder$ py.test /<some_path>/test_xxx.py --server ### -s --browser firefox --html=report.html  traceback (most recent call last):   file "/usr/local/bin/py.test", line 11, in <module>     sys.exit(main())   file "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line 48, in main     config.pluginmanager.check_pending()   file "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 490, in check_pending     (name, hookimpl.plugin)) _pytest.vendored_packages.pluggy.pluginvalidationerror: unknown hook 'pytest_html' in plugin <module 'pytest_suites.conftest' '/<some_path>/conftest.pyc'> 

i have tried this

py.test --server ### -s --browser firefox --html=report.html /<some_path>/test_xxx.py usage: py.test [options] [file_or_dir] [file_or_dir] [...] py.test: error: unrecognized arguments: --server --browser firefox  

so in case looks not able read conftest file

yeah think pytest don't have server argument. it`s missing plugin

you can see args list typing

py.test --help 

check out plugin list https://pytest.org/dev/plugins_index/index.html can use.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -