Skip to content

Commit 8ce27b3

Browse files
committed
Adding tests.
1 parent a9da2f1 commit 8ce27b3

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
run: uv build
2929

3030
- name: Test
31-
run: uvx pytest --all-packages
31+
run: uv run pytest

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ requires-python = ">=3.12"
1212
basic-example = "benchmarkme.examples.basic:bmrk_math"
1313

1414
[tool.pytest.ini_options]
15+
python_files = ["*.py"]
16+
testpaths = ["tests/examples", "src"]
1517
addopts = "--doctest-modules"
1618
doctest_optionflags = "ELLIPSIS NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL"
17-
testpaths = ["tests", "src"]
1819

1920
[build-system]
2021
requires = ["uv_build>=0.9.17,<0.10.0"]

tests/examples/test_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Make sure the example runs without error."""
2-
32
from subprocess import check_call
43

5-
assert not check_call(['bash', '-c', 'basic-example'])
4+
def runok_test():
5+
assert not check_call(['bash', '-c', 'basic-example'])

0 commit comments

Comments
 (0)