Python 3.11.7 and 3.12.1 tweaked the format of the error message. https://github.com/pytest-dev/pytest-mock/pull/404