You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate cuda_pathfinder tests from os.path to pathlib
Part 4 of the series proposed in #2410.
Filesystem predicates and path joining in the pathfinder tests now go through
pathlib: os.path.isfile/isdir become Path.is_file()/is_dir(), os.path.basename
becomes Path.name, os.path.join becomes Path joining, and the site-packages
check uses Path.parts instead of splitting on os.path.sep.
site_pkg_rel.replace("/", os.sep) is dropped in test_find_static_lib.py: Path
already accepts forward slashes on Windows.
Two files are left out on purpose. test_find_nvidia_binaries.py moves with
part 3, whose signature changes it depends on. test_search_steps.py is being
edited by #2489 (part 1), so converting it here would only create a conflict.
Left on the stdlib modules: glob.glob in test_find_nvidia_headers.py, which
expands an absolute pattern from the header catalog (Path.glob needs a base
dir, and the wildcard is not pinned to the last component); os.pathsep in
test_ctk_root_discovery.py, which builds PYTHONPATH, not a path; and os.sep in
test_utils_env_vars.py, which builds a trailing separator on purpose.
Signed-off-by: LeSingh1 <sshaurya914@gmail.com>
0 commit comments