
pytest
List of commands for pytest:
-
pytest:tldr:18482 pytest: Run until a test failure, continuing from the last failing test.$ pytest --stepwisetry on your machineexplain this command
-
pytest:tldr:4544d pytest: Run tests matching or excluding markers.$ pytest -m ${marker_name1 and not marker_name2}try on your machineexplain this command
-
pytest:tldr:b528d pytest: Run tests from specific files.$ pytest ${path-to-test_file1-py path-to-test_file2-py ---}try on your machineexplain this command
-
pytest:tldr:b5b3b pytest: Run tests with names matching a specific [k]eyword expression.$ pytest -k ${expression}try on your machineexplain this command
-
pytest:tldr:cc519 pytest: Run tests without capturing output.$ pytest --capture=notry on your machineexplain this command
-
pytest:tldr:f67e8 pytest: Exit as soon as a test fails or encounters an error.$ pytest --exitfirsttry on your machineexplain this command