Skip to content

Commit

Permalink
explicit sys.path in tests
Browse files Browse the repository at this point in the history
not all import modes add test dir to sys.path
  • Loading branch information
minrk committed Aug 20, 2024
1 parent d8faa05 commit 0077f63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ search = '__version__: str = "{current_version}"'
[tool.cibuildwheel]
build-verbosity = "1"
free-threaded-support = true
test-requires = ["pytest", "importlib_metadata"]
test-requires = ["pytest>=6", "importlib_metadata"]
test-command = "pytest -vsx {package}/tools/test_wheel.py"

[tool.cibuildwheel.linux]
Expand Down
4 changes: 3 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[pytest]
addopts = --durations 10
addopts = --durations 10 --import-mode=importlib
markers =
large: these tests use a lot of memory
new_console: these tests create a new console
wheel: these tests are for installs from a wheel, not dev-installs
# import-mode=importlib doesn't put testpaths on sys.path
pythonpath = tests
testpaths =
tests
# automatically run coroutine tests with asyncio
Expand Down

0 comments on commit 0077f63

Please sign in to comment.