File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -919,6 +919,22 @@ def invocation_dir(self) -> py.path.local:
919
919
"""
920
920
return py .path .local (str (self .invocation_params .dir ))
921
921
922
+ @property
923
+ def rootdir (self ) -> py .path .local :
924
+ """The path to the :ref:`rootdir <rootdir>`.
925
+
926
+ :type: py.path.local
927
+ """
928
+ return py .path .local (str (self .rootpath ))
929
+
930
+ @property
931
+ def inifile (self ) -> Optional [py .path .local ]:
932
+ """The path to the :ref:`configfile <configfiles>`.
933
+
934
+ :type: Optional[py.path.local]
935
+ """
936
+ return py .path .local (str (self .inipath )) if self .inipath else None
937
+
922
938
def add_cleanup (self , func : Callable [[], None ]) -> None :
923
939
"""Add a function to be called when the config object gets out of
924
940
use (usually coninciding with pytest_unconfigure)."""
@@ -1029,8 +1045,8 @@ def _initini(self, args: Sequence[str]) -> None:
1029
1045
rootdir_cmd_arg = ns .rootdir or None ,
1030
1046
config = self ,
1031
1047
)
1032
- self .rootdir = py . path . local ( str ( rootpath ))
1033
- self .inifile = py . path . local ( str ( inipath )) if inipath else None
1048
+ self .rootpath = rootpath
1049
+ self .inipath = inipath
1034
1050
self .inicfg = inicfg
1035
1051
self ._parser .extra_info ["rootdir" ] = self .rootdir
1036
1052
self ._parser .extra_info ["inifile" ] = self .inifile
You can’t perform that action at this time.
0 commit comments