I am planning stop my execution in PyTest after it encounters n failures.
So I have used the below command:
pytest filename.py -v --maxfail = 1
But it displays below error, unable to find the solution. Please throw some light.
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: argument --maxfail: invalid int value: '=1'
pytest filename.py -v --maxfail=1
Removed the spaces near = (equal to symbol) and it worked like a charm.
Pytest stop_test_suite_after_n_test_failures - Error is displayed