Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 45aa7cc

Browse files
committed
Soften wording on doctest.
1 parent ce71ab2 commit 45aa7cc

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Doc/howto/pyporting.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,14 @@ Been deprecated for a while, but Python 3 finally drops support for
483483
friends.
484484

485485

486-
Stop Using :mod:`doctest`
487-
'''''''''''''''''''''''''
488-
While 2to3 tries to port doctests properly, it's a rather tough thing to do. It
489-
is probably best to simply convert your critical doctests to :mod:`unittest`.
486+
Updating doctests
487+
'''''''''''''''''
488+
2to3_ will attempt to generate fixes for doctests that it comes across. It's
489+
not perfect, though. If you wrote a monolithic set of doctests (e.g., a single
490+
docstring containing all of your doctests), you should at least consider
491+
breaking the doctests up into smaller pieces to make it more manageable to fix.
492+
Otherwise it might very well be worth your time and effort to port your tests
493+
to :mod:`unittest`.
490494

491495

492496
Eliminate ``-3`` Warnings

0 commit comments

Comments
 (0)