Skip to content

Commit 64ba26e

Browse files
committed
ci: run bindings examples via pytest entrypoint
Analysis: - examples were invoked via `python -m pytest` from within `cuda_bindings` so the repo checkout was on sys.path and imports resolved to the source tree - `setuptools_scm` generates `cuda/bindings/_version.py` only in the built wheel, so the source tree lacks this file and `from cuda.bindings._version import __version__` fails during example collection - running `pytest` via the installed entrypoint avoids CWD precedence and keeps imports coming from the installed wheel, which includes the generated version file Change: - switch Linux and Windows example steps to call `pytest` entrypoint
1 parent dbd6464 commit 64ba26e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/test-wheel-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ jobs:
261261
LOCAL_CTK: ${{ matrix.LOCAL_CTK }}
262262
run: |
263263
pushd cuda_bindings
264-
${SANITIZER_CMD} python -m pytest -ra -s -vv examples/
264+
${SANITIZER_CMD} pytest -ra -s -vv examples/
265265
popd
266266
267267
- name: Run cuda.core tests

.github/workflows/test-wheel-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ jobs:
234234
shell: bash --noprofile --norc -xeuo pipefail {0}
235235
run: |
236236
pushd cuda_bindings
237-
${SANITIZER_CMD} python -m pytest -ra -s -vv examples/
237+
${SANITIZER_CMD} pytest -ra -s -vv examples/
238238
popd
239239
240240
- name: Run cuda.core tests

0 commit comments

Comments
 (0)