Windows and macOS nightlies are failing after https://github.com/ros2/ci/pull/415/ because pytest is installed as a pip dependency during the batch job. The failure is not present on Linux because pytest is installed as an apt dependency of python3-pytest-mock: https://github.com/ros2/ci/blob/3f57d6d61488743d9cff27c53f89f4a2daffdf82/linux_docker_resources/Dockerfile#L62