Skip to content

Commit d74ff29

Browse files
sebergbsipocz
andcommitted
Apply suggestions from code review
Co-authored-by: Brigitta Sipőcz <[email protected]>
1 parent 2a56bf9 commit d74ff29

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ providing the following features:
4141
* optional inclusion of ``*.rst`` files for doctests (see `Setup and Configuration`_)
4242
* optional inclusion of doctests in docstrings of Numpy ufuncs
4343

44-
Further, `pytest-doctestplus` supports editing files to fix incorrect docstrings
45-
(See `Fixing Existing Docstrings`).
44+
Further, ``pytest-doctestplus`` supports editing files to fix incorrect docstrings
45+
(See `Fixing Existing Docstrings`_).
4646

4747
.. _pytest-remotedata: https://github.com/astropy/pytest-remotedata
4848

@@ -386,13 +386,13 @@ Without further options, this will print out a diff and a list of files that
386386
would be modified. Using ``--doctest-plus-generate-diff=overwrite`` will
387387
modify the files in-place, so it is recommended to run the check first to
388388
verify the paths.
389-
You may wish to use e.g. ``git commit -p`` to review changes manually.
389+
You may wish to review changes manually and only commit some patches e.g. using ``git commit --patch``.
390390

391-
The current diff generation is not very smart, so it does not account for
391+
The current diff generation is still very basic, for example, it does not account for
392392
existing ``...``. By default a diff is only generated for *failing* doctests.
393393

394394
In general, a mass edit may wish to focus on a specific change and
395-
possibly include passing tests. So you can hook into the behavior by
395+
possibly include passing tests. So you can opt-in into the behavior by
396396
adding a hook to your ``conftest.py``::
397397

398398
@pytest.hookimpl

pytest_doctestplus/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ def pytest_addoption(parser):
125125

126126
parser.addoption("--doctest-plus-generate-diff",
127127
help=(
128-
"Generate a diff for where expected output and real "
128+
"Generate a diff where expected output and actual "
129129
"output differ. "
130130
"The diff is printed to stdout if not using "
131131
"`--doctest-plus-generate-diff=overwrite` which "
132132
"causes editing of the original files.\n"
133133
"NOTE: Unless an in-pace build is picked up, python "
134134
"file paths may point to unexpected places. "
135-
"If inplace is not used, will create a temporary "
135+
"If `"overwrite"` is not used, will create a temporary "
136136
"folder and use `git diff -p` to generate a diff."),
137137
choices=["diff", "overwrite"],
138138
action="store", nargs="?", default=False, const="diff")
@@ -886,7 +886,7 @@ class DebugRunnerPlus(doctest.DebugRunner):
886886

887887
def __init__(self, checker=None, verbose=None, optionflags=0,
888888
continue_on_failure=True, generate_diff=False):
889-
# generated_diff is False, "diff", or "inplace" (only need truthiness)
889+
# generated_diff is False, "diff", or "overwrite" (only need truthiness)
890890
DebugRunnerPlus._generate_diff = generate_diff
891891

892892
super().__init__(checker=checker, verbose=verbose, optionflags=optionflags)

0 commit comments

Comments
 (0)