MCPcopy Create free account
hub / github.com/pytest-dev/pytest / __init__

Method __init__

src/_pytest/tmpdir.py:35–52  ·  view source on GitHub ↗
(
        self,
        given_basetemp: Optional[Path],
        trace,
        basetemp: Optional[Path] = None,
        *,
        _ispytest: bool = False,
    )

Source from the content-addressed store, hash-verified

33 _basetemp = attr.ib(type=Optional[Path])
34
35 def __init__(
36 self,
37 given_basetemp: Optional[Path],
38 trace,
39 basetemp: Optional[Path] = None,
40 *,
41 _ispytest: bool = False,
42 ) -> None:
43 check_ispytest(_ispytest)
44 if given_basetemp is None:
45 self._given_basetemp = None
46 else:
47 # Use os.path.abspath() to get absolute path instead of resolve() as it
48 # does not work the same in all platforms (see #4427).
49 # Path.absolute() exists, but it is not public (see https://bugs.python.org/issue25012).
50 self._given_basetemp = Path(os.path.abspath(str(given_basetemp)))
51 self._trace = trace
52 self._basetemp = basetemp
53
54 @classmethod
55 def from_config(

Callers

nothing calls this directly

Calls 1

check_ispytestFunction · 0.90

Tested by

no test coverage detected