python-sdk/tests/shared/test_win32_utils.py
Felix Weinberger 3abefeeeaf
fweinberger/align shutdown with spec (#1091)
Co-authored-by: davenpi <davenport.ianc@gmail.com>
2025-07-09 10:14:30 -04:00

10 lines
314 B
Python

"""Windows-specific test utilities."""
def escape_path_for_python(path: str) -> str:
"""Escape a file path for use in Python code strings.
Converts backslashes to forward slashes which work on all platforms
and don't need escaping in Python strings.
"""
return repr(path.replace("\\", "/"))