From 5115e925761c12ec1d790ded881fc2793dbf46c5 Mon Sep 17 00:00:00 2001 From: joncrall Date: Wed, 6 Oct 2021 00:43:08 -0400 Subject: [PATCH] Default to analysis=auto everywhere --- CHANGELOG.md | 5 +++++ xdoctest/core.py | 4 ++-- xdoctest/runner.py | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 392deee4..508828a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/xdoctest/core.py b/xdoctest/core.py index c77d7cfa..0525c448 100644 --- a/xdoctest/core.py +++ b/xdoctest/core.py @@ -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. @@ -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 diff --git a/xdoctest/runner.py b/xdoctest/runner.py index bb03e62d..d954828b 100644 --- a/xdoctest/runner.py +++ b/xdoctest/runner.py @@ -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. @@ -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.'