|
pytest test_mod.py
|
Run tests in a module.
|
|
pytest testing/
|
Run tests in a directory.
|
|
pytest test_mod.py::test_func
|
Run a specific test within a module.
|
|
pytest test_mod.py::TestClass::test_method
|
Run a specific method of a class.
|
|
-k "expression"
|
Run tests by keyword expression.
|
|
-m "expression"
|
Run tests by marker expression.
|
|
--fixtures
|
Shows builtin and custom fixtures.
|
|
--markers
|
Shows builtin and custom markers.
|
|
--lf, --last-failed
|
Run only the failed tests from the previous run.
|
|
--ff, --failed-first
|
Rerun the failures first and then successful tests.
|
|
-x, --exitfirst
|
Exit immediately on first error or failed test.
|
|
-v, --verbose
|
More verbosity.
|
|
-q, --quiet
|
Less verbosity.
|
|
--disable-warnings,
--disable-pytest-warnings |
Disable the display of warnings summary.
|
|
--html=path
|
Generate the HTML report at given path [pytest-html].
|
|
-r
|
Display a short test summary info.
|
|
-l,
--showlocals |
Show local variable in traceback.
|
|
--full-trace
|
Show complete tracebacks. Default is to cut.
|
|
--pdb
|
Pytest places a debugger breakpoint whenever an error occurs in tests.
|
|
--co,
--collect-only |
Collect tests, don't execute them.
|
|
--help
|
Lists all the Pytest and dependent packages command line options.
|
|
-n numprocesses
|
Number of processes to start. Can be a positive integer or Use 'auto' for auto detection CPUs number.
|
|
--dist no/ loadscope/ loadfile
|
Select the test distribution algorithm with the --dist option.
|
|
--testrail
|
Create and update testruns.
|
|
--tr-config=path
|
Defaults to testrail.cfg .
|
|
--testrail-run-name
|
Name given to Testrun.
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.