Skip to content

Commit 95b6f54

Browse files
committed
dev: allow running tests from the root of the repo
1 parent 35978a9 commit 95b6f54

File tree

11 files changed

+53
-164
lines changed

11 files changed

+53
-164
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Alternatively, you can use [pixi](https://pixi.sh/latest/installation/) to wrap
4747

4848
```
4949
# run tests against CUDA 13
50-
pixi run -e cu13 test -n auto -v
50+
pixi run -e cu13 pytest -n auto -v
5151
```
5252

5353

ci/coverage_report.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rapids-logger "Show Numba system info"
2929
python -m numba --sysinfo
3030

3131
rapids-logger "Run Tests with Coverage"
32-
python -m pytest -v --cov
32+
python -m pytest -v --cov ..
3333

3434
rapids-logger "Generate Markdown Coverage Report"
3535
python -m coverage report --format markdown >> $GITHUB_STEP_SUMMARY

ci/test_conda.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ rapids-logger "Test importing numba.cuda"
7979
python -c "from numba import cuda"
8080

8181
rapids-logger "Run Tests"
82-
pytest -v
82+
pytest -v ..
8383

8484
popd
8585

ci/test_simulator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ set +e
5050

5151
rapids-logger "Run Tests"
5252
export NUMBA_ENABLE_CUDASIM=1
53-
pytest -v
53+
pytest -v ..
5454

5555
popd
5656

ci/test_wheel.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ rapids-logger "Show Numba system info"
5050
python -m numba --sysinfo
5151

5252
rapids-logger "Run Tests"
53-
python -m pytest -v
53+
python -m pytest -v ..
5454

5555
popd

ci/test_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ rapids-logger "Show Numba system info"
4040
python -m numba --sysinfo
4141

4242
rapids-logger "Run Tests"
43-
python -m pytest -v
43+
python -m pytest -v ..
4444

4545
popd

ci/test_wheel_deps_wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ apt remove --purge `dpkg --get-selections | grep cuda-nvvm | awk '{print $1}'` -
3131
apt remove --purge `dpkg --get-selections | grep cuda-nvrtc | awk '{print $1}'` -y
3232

3333
rapids-logger "Run Tests"
34-
NUMBA_CUDA_TEST_BIN_DIR=$NUMBA_CUDA_TEST_BIN_DIR python -m pytest -v
34+
NUMBA_CUDA_TEST_BIN_DIR=$NUMBA_CUDA_TEST_BIN_DIR python -m pytest -v ..
3535

3636
popd
File renamed without changes.

pixi.lock

Lines changed: 41 additions & 144 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,11 @@ numba-cuda = { path = ".", editable = true }
156156
[tool.pixi.environments]
157157
cu12 = { features = ["cu12", "test"], solve-group = "cu12" }
158158
cu13 = { features = ["cu13", "test"], solve-group = "cu13" }
159-
test = { features = ["test"], solve-group = "test" }
160-
161-
[tool.pixi.tasks]
162-
test = { cmd = ["pytest", "$PIXI_PROJECT_ROOT/numba_cuda/numba/cuda/tests"] }
163159

164160
[tool.pyrefly]
165161
search-path = ["./numba_cuda"]
162+
163+
[tool.pytest.ini_options]
164+
minversion = "8.0"
165+
consider_namespace_packages = true
166+
addopts = "--dist loadscope"

0 commit comments

Comments
 (0)