Enable fail-fast for pytest so it works like fail-fast for junit
Review Request #3497 - Created Feb. 24, 2016 and submitted
|Nick Howard (Twitter)|
|benjyw, jsirois, kwlzn, zundel|
Fail fast didn't work the way I expected when trying to use it with python tests. This gives it behavior like junit runner's. Now when --fail-fast is specified, the pytest runner will bail after the first failure, and Pants will also skip running the rest of the targets if not running in fast mode.
Wrote tests exercising both code paths for pytest execution. CI away on PR.
Should this now be deprecated in favor of the global --fail-fast?
I'm confused about the distinction between fast, slow, hard and soft. An explanatory comment would be helpful. Or even better- do we actually need the "hard"/"soft" terminology?
Referencing "existing behavior" makes sense in a commit message, but not in a code comment, as the reader won't have that history in their minds.
deprecate and ignore --fail-slow for pytest, use --fail-fast to stop on first failure in both fast and isolated modes.
Revision 2 (+16 -4)