Skip to content

Commit

Permalink
Merge pull request #2546 from SnoopJ/bugfix/fix-file-race
Browse files Browse the repository at this point in the history
test: explicitly specify `testpaths`
  • Loading branch information
dgw authored Nov 5, 2023
2 parents 15a3b73 + 74d6b8d commit 16871a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 16871a7

Please sign in to comment.