From a99387d52da1fd34086c52e8ff15c82ea151f4ad Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 13 Feb 2024 18:57:45 -0600 Subject: [PATCH] pytest improvements (#1864) * move these to pyproject so you can do pytest . * add comment for bug * add comment for bug --- pyproject.toml | 3 ++- tests/safety/test.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0d8709db..2b5b18c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,4 +8,5 @@ flake8-implicit-str-concat.allow-multiline=false [tool.pytest.ini_options] # FIXME: pytest 8.0.0 now collects all files, stop pytest-cpp from running these -addopts = "--ignore=test.sh --ignore=test_coverage.sh" +# the `not Base` filter is needed due to a bug in pytest w/ unittest: https://github.com/pytest-dev/pytest/issues/11552 +addopts = "--ignore=test.sh --ignore=test_coverage.sh -n auto -k 'not Base'" diff --git a/tests/safety/test.sh b/tests/safety/test.sh index d01c5009..22620dfe 100755 --- a/tests/safety/test.sh +++ b/tests/safety/test.sh @@ -7,5 +7,5 @@ cd $DIR HW_TYPES=( 6 9 ) for hw_type in "${HW_TYPES[@]}"; do echo "Testing HW_TYPE: $hw_type" - HW_TYPE=$hw_type pytest -n auto test_*.py -k 'not Base' + HW_TYPE=$hw_type pytest test_*.py done