File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -249,8 +249,22 @@ def pytest_addoption(parser: Parser) -> None:
249
249
250
250
251
251
def validate_basetemp (path : str ) -> str :
252
+ """
253
+ Validate the provided `basetemp` path to ensure it is not empty,
254
+ the current working directory (cwd), or any ancestor of the cwd.
255
+ Args:
256
+ path (str): The basetemp path.
257
+ Returns:
258
+ string: The validated basetemp path.
259
+ Raises:
260
+ argparse.ArgumentTypeError in 3 cases:
261
+ 1) if the path is empty;
262
+ 2) if it is the cwd;
263
+ 3) if it is an ancestor of the cwd.
264
+ """
265
+
252
266
# GH 7119
253
- msg = "basetemp must not be empty, the current working directory or any parent directory of it"
267
+ msg = "basetemp must not be: empty, the current working directory or any parent directory of it"
254
268
255
269
# empty path
256
270
if not path :
You can’t perform that action at this time.
0 commit comments