Skip to content

Commit 8aaf992

Browse files
author
muxator
committed
tests: centralize --doctest-modules option in pytest.ini
We have meaningful doctests in the code base. Before this change, their execution had to be manually activated in Makefile and tox.ini. This change centralizes the option in pytest.ini, so that we reduce the future occurrence of human errors (less duplication, less oversights).
1 parent 7f083a5 commit 8aaf992

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ darglint-files: ## run darglint for specific files (specified with files="file1
154154
test: ## run tests quickly with the default Python
155155
pytest \
156156
tests/ \
157-
--doctest-modules black_it \
157+
black_it \
158158
--cov=black_it \
159159
--cov-report=xml \
160160
--cov-report=html \

pytest.ini

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ log_cli_date_format=%Y-%m-%d %H:%M:%S
66

77
markers =
88
e2e: marks end-to-end tests which involve several library components.
9+
10+
addopts = --doctest-modules

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ deps =
2121
mistletoe==1.2.1
2222

2323
commands =
24-
pytest --basetemp={envtmpdir} --doctest-modules \
24+
pytest --basetemp={envtmpdir} \
2525
black_it tests/ \
2626
--cov=black_it \
2727
--ignore=example/models \

0 commit comments

Comments
 (0)