Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added doctest encoding command line option #2101

Merged
merged 8 commits into from
Nov 30, 2016
Prev Previous commit
Added "versionadded" for doctest_encoding ini option to docs.
  • Loading branch information
wheerd committed Nov 30, 2016
commit 2edfc805afefbbabdeccdb9b4e9fd6ab89335008
16 changes: 9 additions & 7 deletions doc/en/doctest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ can change the pattern by issuing::
on the command line. Since version ``2.9``, ``--doctest-glob``
can be given multiple times in the command-line.

You can specify the encoding that will be used for those doctest files
using the ``doctest_encoding`` ini option:
.. versionadded:: 3.1

.. code-block:: ini
You can specify the encoding that will be used for those doctest files
using the ``doctest_encoding`` ini option:

# content of pytest.ini
[pytest]
doctest_encoding = latin1
.. code-block:: ini

# content of pytest.ini
[pytest]
doctest_encoding = latin1

The default encoding is UTF-8.
The default encoding is UTF-8.

You can also trigger running of doctests
from docstrings in all python modules (including regular
Expand Down