From 69cfb785dc23f8358c5542df6291ee848f1ca04e Mon Sep 17 00:00:00 2001 From: Hunter Hogan Date: Sat, 3 May 2025 23:13:48 -0500 Subject: [PATCH] Update help message for 'path' argument to match user's environment (#13936) --- tests/runtests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/runtests.py b/tests/runtests.py index e81fb848c7c4..ca1c3f2676bc 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -8,7 +8,7 @@ import subprocess import sys from importlib.util import find_spec -from pathlib import Path +from pathlib import Path, PurePath from ts_utils.paths import TEST_CASES_DIR, test_cases_path from ts_utils.utils import colored @@ -58,7 +58,9 @@ def main() -> None: choices=("3.9", "3.10", "3.11", "3.12", "3.13"), help="Target Python version for the test (default: %(default)s).", ) - parser.add_argument("path", help="Path of the stub to test in format /, from the root of the project.") + parser.add_argument( + "path", help=f"Path of the stub to test in format {PurePath('', '')}, from the root of the project." + ) args = parser.parse_args() path: str = args.path run_stubtest: bool = args.run_stubtest @@ -66,7 +68,7 @@ def main() -> None: path_tokens = Path(path).parts if len(path_tokens) != 2: - parser.error("'path' argument should be in format /.") + parser.error(f"'path' argument should be in format {PurePath('', '')}.") folder, stub = path_tokens if folder not in {"stdlib", "stubs"}: parser.error("Only the 'stdlib' and 'stubs' folders are supported.")