49
49
from _pytest ._io import TerminalWriter
50
50
from _pytest .compat import final
51
51
from _pytest .compat import importlib_metadata
52
- from _pytest .compat import LEGACY_PATH
53
52
from _pytest .compat import legacy_path
54
53
from _pytest .outcomes import fail
55
54
from _pytest .outcomes import Skipped
@@ -950,17 +949,6 @@ def __init__(
950
949
951
950
self .cache : Optional [Cache ] = None
952
951
953
- @property
954
- def invocation_dir (self ) -> LEGACY_PATH :
955
- """The directory from which pytest was invoked.
956
-
957
- Prefer to use :attr:`invocation_params.dir <InvocationParams.dir>`,
958
- which is a :class:`pathlib.Path`.
959
-
960
- :type: LEGACY_PATH
961
- """
962
- return legacy_path (str (self .invocation_params .dir ))
963
-
964
952
@property
965
953
def rootpath (self ) -> Path :
966
954
"""The path to the :ref:`rootdir <rootdir>`.
@@ -971,16 +959,6 @@ def rootpath(self) -> Path:
971
959
"""
972
960
return self ._rootpath
973
961
974
- @property
975
- def rootdir (self ) -> LEGACY_PATH :
976
- """The path to the :ref:`rootdir <rootdir>`.
977
-
978
- Prefer to use :attr:`rootpath`, which is a :class:`pathlib.Path`.
979
-
980
- :type: LEGACY_PATH
981
- """
982
- return legacy_path (str (self .rootpath ))
983
-
984
962
@property
985
963
def inipath (self ) -> Optional [Path ]:
986
964
"""The path to the :ref:`configfile <configfiles>`.
@@ -991,16 +969,6 @@ def inipath(self) -> Optional[Path]:
991
969
"""
992
970
return self ._inipath
993
971
994
- @property
995
- def inifile (self ) -> Optional [LEGACY_PATH ]:
996
- """The path to the :ref:`configfile <configfiles>`.
997
-
998
- Prefer to use :attr:`inipath`, which is a :class:`pathlib.Path`.
999
-
1000
- :type: Optional[LEGACY_PATH]
1001
- """
1002
- return legacy_path (str (self .inipath )) if self .inipath else None
1003
-
1004
972
def add_cleanup (self , func : Callable [[], None ]) -> None :
1005
973
"""Add a function to be called when the config object gets out of
1006
974
use (usually coninciding with pytest_unconfigure)."""
0 commit comments