I am getting error "pytest: error: unrecognized arguments: --show-capture=no" while executing tests using pytest
See original GitHub issueCommand i am trying to execute:
pytest --show-capture=no -v --dsn="emulator-5554" -m bat --reruns=2
LINE NUMBERS
usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --show-capture=no
inifile: /home/ANT.AMAZON.COM/jaiadi/kats-agent/workdir/54/workspace/test/pytest.ini
rootdir: /home/ANT.AMAZON.COM/jaiadi/kats-agent/workdir/54/workspace/test
usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --show-capture=no
inifile: /home/ANT.AMAZON.COM/jaiadi/kats-agent/workdir/54/workspace/test/pytest.ini
rootdir: /home/ANT.AMAZON.COM/jaiadi/kats-agent/workdir/54/workspace/test
usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --show-capture=no
inifile: /home/ANT.AMAZON.COM/jaiadi/kats-agent/workdir/54/workspace/test/pytest.ini
rootdir: /home/ANT.AMAZON.COM/jaiadi/kats-agent/workdir/54/workspace/test
Pytest version i am using:
This is pytest version 5.3.5, imported from /home/ANT.AMAZON.COM/jaiadi/kats-ag...-packages/pytest/__init__.py
setuptools registered plugins:
pytest-rerunfailures-8.0 at /home/ANT.AMAZON.COM/jaiadi/kats-ag...ages/pytest_rerunfailures.py
pytest-cov-2.3.1 at /home/ANT.AMAZON.COM/jaiadi/kats-ag...ackages/pytest_cov/plugin.py
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
How to fix "pytest: error: unrecognized arguments: -n"
Till now the tests were running perfectly fine. Suddenly the pytest is throwing a weird error saying "unrecognized argument".
Read more >Pytest ERROR Unrecognized arguments from os.getenv ...
Hi, I'm having trouble getting CircleCI config.yml to handle four command line arguments that my code sets through os.getenv as environment ...
Read more >pytest Documentation - Read the Docs
When pytest goes to run a test, it looks at the parameters in that test function's signature, and then searches for fixtures.
Read more >pytest error unrecognized arguments --html basic html - Edureka
Hi Guys,. I am trying to create one Pytest report in HTML format. But It is showing me the below error. C:\Users\Nadeem Akhter\pytest>pytest...
Read more >multiple arguments to pytest run configuration causes ...
Creating a run/debug configuration to run pytest tests that requires ... _jb_pytest_runner.py: error: unrecognized arguments: –app_config –etl_config .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think I get why this error happens. Since option is defined in
tests/conftest.py
it exists insidetests
. Whenever I run pytest outsidetests
I get unrecognized argument error.Please update the rerunfailures plugin as well, and please start to use the code formatting feature of github, it’s painful to read unformatted pastes