Skip to content

Commit

Permalink
Use xdoctest instead of doctest for better error handling. (conda#11018)
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez authored Nov 4, 2021
1 parent b3e44db commit 23aba44
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions conda/cli/python_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,11 @@ def run_command(command, *arguments, **kwargs):
Examples::
>> run_command(Commands.CREATE, "-n", "newenv", "python=3", "flask",
>> run_command(Commands.CREATE, "-n", "newenv", "python=3", "flask", \
use_exception_handler=True)
>> run_command(Commands.CREATE, "-n", "newenv", "python=3", "flask")
>> run_command(Commands.CREATE, ["-n", "newenv", "python=3", "flask"], search_path=())
"""
initialize_std_loggers()
use_exception_handler = kwargs.pop('use_exception_handler', False)
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ addopts =
--tb native
--strict-markers
--durations 16
--doctest-modules
--xdoctest-modules
--xdoctest-style=google
--cov-report xml
--cov-report term-missing
--cov conda
Expand All @@ -22,6 +23,7 @@ doctest_optionflags =
NORMALIZE_WHITESPACE
IGNORE_EXCEPTION_DETAIL
ALLOW_UNICODE
ELLIPSIS
markers =
integration: integration tests that usually require an internet connect
slow: slow running tests
Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ conda-build
conda-package-handling
conda-verify
conda-forge::pytest-split
conda-forge::xdoctest
cytoolz
filelock
flake8
Expand Down

0 comments on commit 23aba44

Please sign in to comment.