Skip to content

Instantly share code, notes, and snippets.

@tjkhara
Created October 18, 2020 17:05
Show Gist options
  • Select an option

  • Save tjkhara/70d41db258c9a491f1ffd87778775def to your computer and use it in GitHub Desktop.

Select an option

Save tjkhara/70d41db258c9a491f1ffd87778775def to your computer and use it in GitHub Desktop.
Pytest useful command line arguments

PyTest Useful Command Line Arguments

  • Pass in module name

  • Pass in directory path

  • -k option this matches expressions

  • -m This matches tests that have a pytest.mark decorator

    -v is for verbose output -q is for quiet mode -s do not capture console output --ignore You can specify ignore path --maxfail Stop after specified number of failures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment