Skip to content

Commit ce6c2c8

Browse files
committed
Try to get more info
1 parent 9b2c22b commit ce6c2c8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

cuda_core/tests/example_tests/test_basic_examples.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import glob
77
import os
88
import platform
9-
import re
109
import subprocess
1110
import sys
1211

@@ -104,19 +103,24 @@ def test_example(self, example):
104103
raise AssertionError(f"`{example}` failed ({process.returncode})")
105104

106105
@pytest.mark.skipif(not uv_installed(), reason="uv is required to test PEP 723 metadata installation")
107-
@pytest.mark.skipif(sys.platform == "win32", reason="uv does not currently work on Windows in CI")
108106
def test_example_pep723(self, example):
109107
system_requirement = SYSTEM_REQUIREMENTS.get(example, lambda: True)
110108
if not system_requirement():
111109
pytest.skip(f"Skipping {example} due to unmet system requirement")
112110

113111
example_path = os.path.join(samples_path, example)
114-
process = subprocess.run(["uv", "run", example_path], capture_output=True) # noqa: S603, S607
112+
113+
# Have uv use the same version of Python that is running the test suite,
114+
# not because they have to match but to give Python version coverage in CI.
115+
version_info = sys.version_info
116+
py_version = f"{version_info.major}.{version_info.minor}"
117+
118+
process = subprocess.run(["uv", "run", "--python", py_version, example_path], capture_output=True) # noqa: S603, S607
115119
if process.returncode != 0:
116120
# This example requires a development version of cuda_core, so requirements can't be met.
117121
# That's ok, it was tested in the other test, so we just skip it instead of failing.
118-
if re.search("Because only cuda-(core)|(bindings)", process.stderr.decode()):
119-
pytest.skip(f"Skipping {example} due to unmet PEP 723 requirement")
122+
# if re.search("Because only cuda-(core)|(bindings)", process.stderr.decode()):
123+
# pytest.skip(f"Skipping {example} due to unmet PEP 723 requirement")
120124

121125
if process.stdout:
122126
print(process.stdout.decode())

0 commit comments

Comments
 (0)