how to run pytest and enter console on failure code example Example: how to run pytest and enter console on failure pytest --pdb