chore: add pathlib check

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Henry Schreiner
2025-02-28 16:38:15 -05:00
committed by Henry Schreiner
parent 3e37148923
commit 783be9bc2f
6 changed files with 20 additions and 19 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ from __future__ import annotations
import os
import subprocess
import textwrap
from pathlib import Path
import pytest
@@ -16,8 +17,8 @@ def skip_if_no_msvc(arm64: bool = False) -> None:
if not programfiles:
pytest.skip("Requires %PROGRAMFILES(X86)% variable to be set")
vswhere = os.path.join(programfiles, "Microsoft Visual Studio", "Installer", "vswhere.exe")
if not os.path.isfile(vswhere):
vswhere = Path(programfiles, "Microsoft Visual Studio", "Installer", "vswhere.exe")
if not vswhere.is_file():
pytest.skip("Requires Visual Studio installation")
require = "Microsoft.VisualStudio.Component.VC.Tools.x86.x64"