How to correctly pass invocation_dir to ExceptionInfo.getrepr() in pytest?