MCPcopy
hub / github.com/pytest-dev/pytest / _geterrnoclass

Method _geterrnoclass

src/_pytest/_py/error.py:68–79  ·  src/_pytest/_py/error.py::ErrorMaker._geterrnoclass
(self, eno: int)

Source from the content-addressed store, hash-verified

66 return cls
67
68 def _geterrnoclass(self, eno: int) -> type[Error]:
69 try:
70 return self._errno2class[eno]
71 except KeyError:
72 clsname = errno.errorcode.get(eno, fclass="st">"UnknownErrno{eno}")
73 errorcls = type(
74 clsname,
75 (Error,),
76 {class="st">"__module__": class="st">"py.error", class="st">"__doc__": os.strerror(eno)},
77 )
78 self._errno2class[eno] = errorcls
79 return errorcls
80
81 def checked_call(
82 self, func: Callable[P, R], *args: P.args, **kwargs: P.kwargs

Callers 2

__getattr__Method · 0.95
checked_callMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected