Skip to content

Commit a9cf0d0

Browse files
committed
ENH: togle doctest-only-doctests to False by default
1 parent 01e8250 commit a9cf0d0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

scipy_doctest/plugin.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ def pytest_addoption(parser):
3333
# https://github.com/pytest-dev/pytest/discussions/13435
3434
#
3535
# Therefore, we add a new option, --doctest-only-doctests,
36-
# which is `true` by default, for now.
36+
# which was `true` by default in versions 1.x.
3737
#
38-
# In v2.0, it the default will become `false`, so that
38+
# In v2.0, the default is `false`, so that
3939
#
4040
# $ pytest --doctest-modules
4141
#
42-
# will run both doctests and unit tests, and the way to use the
43-
# current behavior (only run doctests, skip unit tests) will be
42+
# runs both doctests and unit tests, and the way to use the previous behavior
43+
# (only run doctests, skip unit tests) is
4444
#
4545
# $ pytest --doctest-modules --doctest-only-doctests=true
4646
#
4747
group.addoption("--doctest-only-doctests",
4848
action="store",
49-
default="true",
49+
default="false",
5050
help="Whether to only collect doctests, or also collect unit tests, too.",
5151
choices=("true", "false"),
5252
dest="doctest_only_doctests"
@@ -71,9 +71,9 @@ def pytest_ignore_collect(collection_path, config):
7171
This function is used to exclude the 'tests' directory and test modules when
7272
the `--doctest-modules` option is used.
7373
"""
74-
# XXX: in v2.0, --doctest-modules will mean "run both doctests and unit tests",
75-
# (consistent with vanilla pytest), and the way to retain the current behavior
76-
# will be to add --doctest-only-doctests=true to the CLI command
74+
# XXX: From v2.0, --doctest-modules means "run both doctests and unit tests",
75+
# (consistent with vanilla pytest), and the way to retain the 1.x behavior
76+
# is to add --doctest-only-doctests=true to the CLI command
7777
if (
7878
config.getoption("--doctest-modules") and
7979
config.getoption("--doctest-only-doctests") == 'true'

0 commit comments

Comments
 (0)