Skip to content

Commit

Permalink
Default to analysis=auto everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Oct 6, 2021
1 parent 6293b01 commit 5115e92
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## Version 0.15.10 - Unreleased


### Changed

* The xdoctest "analysis" option now defaults to "auto" everywhere.

### Fixed

* Fix issue #112 `--analysis=dynamic` argument is now respected
Expand Down
4 changes: 2 additions & 2 deletions xdoctest/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def parse_calldefs(module_identifier, analysis='auto'):

def parse_doctestables(module_identifier, exclude=[], style='auto',
ignore_syntax_errors=True, parser_kw={},
analysis='static'):
analysis='auto'):
"""
Parses all doctests within top-level callables of a module and generates
example objects. The style influences which tests are found.
Expand All @@ -610,7 +610,7 @@ def parse_doctestables(module_identifier, exclude=[], style='auto',
parser_kw: extra args passed to the parser
analysis (str, default='static'):
analysis (str, default='auto'):
if 'static', only static analysis is used to parse call
definitions. If 'auto', uses dynamic analysis for compiled python
extensions, but static analysis elsewhere, if 'dynamic', then
Expand Down
4 changes: 2 additions & 2 deletions xdoctest/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def doctest_callable(func):

def doctest_module(module_identifier=None, command=None, argv=None, exclude=[],
style='auto', verbose=None, config=None, durations=None,
analysis='static'):
analysis='auto'):
"""
Executes requestsed google-style doctests in a package or module.
Main entry point into the testing framework.
Expand Down Expand Up @@ -585,7 +585,7 @@ def str_lower(x):

add_argument(*('--analysis',), type=str,
help='How doctests are collected',
choices=['auto', 'static', 'dynamic'], default='static')
choices=['auto', 'static', 'dynamic'], default='auto')

add_argument(*('--durations',), type=int,
help=('Specify execution times for slowest N tests.'
Expand Down

0 comments on commit 5115e92

Please sign in to comment.