sorin
sorin

Reputation: 170460

How do I make pytest fail fast as a user level configuration?

I want to always run pytest in a fail-fast mode like --maxfail=1, regardless the code repository I am testing.

Mainly I am using for a config item which can be setup as an environment variable or a user homedir config file which would make it fail fast.

Upvotes: 2

Views: 628

Answers (1)

Jan K
Jan K

Reputation: 4150

The following environment variable should do the job:

export PYTEST_ADDOPTS="-x"

More info:

Upvotes: 4

Related Questions