From 74d6b8d2a8c3ec08f25d18be9e4b652610f33bb0 Mon Sep 17 00:00:00 2001 From: James Gerity Date: Sat, 4 Nov 2023 17:27:54 -0400 Subject: [PATCH] test: explicitly specify `testpaths` --- Makefile | 8 ++++---- pyproject.toml | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 94f35a7d3..35decee8c 100644 --- a/Makefile +++ b/Makefile @@ -12,20 +12,20 @@ lint-type: .PHONY: test test_norecord test_novcr vcr_rerecord test: - coverage run -m pytest -v . + coverage run -m pytest -v test_norecord: # error if VCR recording for a web request is missing (useful on CI) - coverage run -m pytest -v . --vcr-record=none + coverage run -m pytest -v --vcr-record=none test_novcr: # disable VCR completely; useful to check if recordings are outdated - coverage run -m pytest -v . --disable-vcr + coverage run -m pytest -v --disable-vcr vcr_rerecord: # clear VCR cassettes and run tests to record fresh ones rm -rf ./test/vcr/* - coverage run -m pytest -v . --vcr-record=all + coverage run -m pytest -v --vcr-record=all .PHONY: coverage_report coverage_html coverages coverage_report: diff --git a/pyproject.toml b/pyproject.toml index cff96f1ea..5746b069a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,6 +73,8 @@ sopel-plugins = "sopel.cli.plugins:main" pytest-sopel = "sopel.tests.pytest_plugin" [tool.pytest.ini_options] +# NOTE: sopel/ is included here to include dynamically-generated tests +testpaths = ["test", "sopel"] python_files = "*.py" addopts = "--tb=short -p no:nose" norecursedirs = "build contrib"