You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using redislite to write unit tests for a project. I recently move this project to a repo following this template, which configures pytest using pyproject.toml. When I tried running my tests again, they failed and after some investigation, I discovered that it was the --doctest-modules. Here is my config:
[tool.pytest.ini_options]
# https://docs.pytest.org/en/6.2.x/customize.html#pyproject-toml
# Directories that are not visited by pytest collector:
norecursedirs =["hooks", "*.egg", ".eggs", "dist", "build", "docs", ".tox", ".git", "__pycache__"]
doctest_optionflags = ["NUMBER", "NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL"]
# Extra options:
addopts = [
"--strict-markers",
"--tb=short",
# "--doctest-modules", # For some reason, makes the patch_redis() fail
"--doctest-continue-on-failure",
]
If I uncomment the --doctest-modules, it seems that patch_redis() has no effect (it's at the top of the .py, btw).
The text was updated successfully, but these errors were encountered:
I've been using redislite to write unit tests for a project. I recently move this project to a repo following this template, which configures pytest using
pyproject.toml
. When I tried running my tests again, they failed and after some investigation, I discovered that it was the--doctest-modules
. Here is my config:If I uncomment the
--doctest-modules
, it seems thatpatch_redis()
has no effect (it's at the top of the .py, btw).The text was updated successfully, but these errors were encountered: