xdoctest

A rewrite of Python's builtin doctest module (with pytest plugin integration) with AST instead of REGEX.

APACHE-2.0 License

Downloads
711.5K
Stars
205
Committers
9

Bot releases are visible (Hide)

xdoctest - Version 1.2.0 Latest Release

Published by github-actions[bot] 2 months ago

Version 1.2.0 - Released 2024-08-20

Added

  • Support for top level awaits in async code examples.

Removed

  • Dropped 3.6 and 3.7 support. Now supporting 3.8+ Use xdoctest<=1.1.6 for 3.6 or 3.7 support.

What's Changed

Full Changelog: https://github.com/Erotemic/xdoctest/compare/v1.1.6...refs/heads/release

xdoctest - Version 1.1.6

Published by github-actions[bot] 3 months ago

Version 1.1.6 - Released 2024-08-01

Fixed

  • Fixed passing of flags as keyword argument to re.sub for python 3.13 compliance.

What's Changed

New Contributors

Full Changelog: https://github.com/Erotemic/xdoctest/compare/v1.1.5...refs/heads/release

xdoctest - Version 1.1.5

Published by github-actions[bot] 5 months ago

This patch release fixes the modname_to_modpath issue that 1.1.4 mitigated. It should be once again be possible to invoke xdoctest using module names of packages that installed in editable mode (a feature that was broken whenever type annotations were added into the editable finder files installed to site-packages).

Version 1.1.5 - Released 2024-06-07

Changed

  • Minor modification to xdoctest --version-info and exposed it in CLI help.

Fixed

  • modname_to_modpath fixed in cases where editable installs use type annotations in their MAPPING definition.

What's Changed

Full Changelog: https://github.com/Erotemic/xdoctest/compare/v1.1.4...refs/heads/release

xdoctest - Version 1.1.4

Published by github-actions[bot] 5 months ago

Fixed

  • Working around a modname_to_modpath issue.

What's Changed

Full Changelog: https://github.com/Erotemic/xdoctest/compare/v1.1.3...refs/heads/release

xdoctest - Version 1.1.3

Published by Erotemic 9 months ago

Version 1.1.3 - Released 2024-01-30

Fixed

  • modname_to_modpath now handles cases where editable packages have modules where the name is different than the package.
  • Update xdoctest.plugin to support pytest 8.0
  • Fixed deprecated usage of ast.Num

What's Changed

Full Changelog: https://github.com/Erotemic/xdoctest/compare/v1.1.2...v1.1.3

xdoctest - Version 1.1.2

Published by Erotemic 12 months ago

Version 1.1.2 - Released 2023-010-25

Added

  • Partial support for 3.12. New f-string syntax is not supported yet.

Changed

  • Removed dependency on six and got rid of old Python 2 logic
xdoctest - Version 1.1.1

Published by Erotemic over 1 year ago

Version 1.1.1 - Released 2023-01-29

Changed

  • Binary tests are now only run on "full" installs to reduce minimal dependencies.
  • Support for Python 3.11
  • Minor typing fixes
xdoctest - Version 1.1.0

Published by Erotemic about 2 years ago

Fixed

  • Can now handle basic versions of the new __editable__ package finder mechanism.
  • Parsing bug where directives were incorrectly flagged as inline if they were
    directly followed by a function with a decorator.

Removed

  • Dropped 2.7 and 3.5 support. Now supporting 3.6+ Use xdoctest<=1.0.2 for 2.7
    or 3.5 support.

Changed

  • Improved the "dump" functionality of converting doctests to unit tests.
xdoctest - Version 1.0.2

Published by Erotemic about 2 years ago

Added

  • Environs as options:
    XDOCTEST_VERBOSE, XDOCTEST_OPTIONS, XDOCTEST_GLOBAL_EXEC, XDOCTEST_REPORT,
    XDOCTEST_STYLE, and XDOCTEST_ANALYSIS environment variables can now be used
    to specify configuration defaults.

Changed

  • Added experimental hidden feature --insert-skip-directive-above-failures
    that can be used to modify your code such that failing doctests are marked as
    skip.
  • Disabled traceback suppression on module import errors (this is is
    configurable via the "supress_import_errors" option).
  • Xdoctest will no longer try to pre-import the module if none of its doctests
    have any enabled lines. This also means global-exec statements will NOT run
    for those tests, which means you can no longer use global-exec to
    force enabling tests.
xdoctest - Version 1.0.1

Published by Erotemic over 2 years ago

Added

  • Add type stubs
  • Basic support for pyproject.toml under tool.xdoctest. Currently only
    supports options in the native runner.

Fixed

  • Corner case bug in error reporting
  • Doctests that never run any code are now correctly marked as skipped
  • Issue where the "dumps" command was undocumented and has an error.

Changed

  • Moved some globals into a new module called global_state and allowed
    environs to enable debug print statements.
  • Added util_deprecation module to robustly mark features as deprecated.
  • Modified the google style return type parser to return a type if the
    only content is some parsable python code.
  • Modified docscrape google to allow for parsing of *args and **kwargs in
    args blocks. This has also moved to the standalone package googledoc
  • Overhaul of repo structure in an effort to modernize and to agree with
    templates defined by xcookie
  • Module code now lives in the "src" directory to remove install vs develop
    ambiguity.
xdoctest - Version 1.0.0

Published by Erotemic over 2 years ago

There is nothing too special functionality-wise about this 1.0 release, except that xdoctest has been in a 1.0 state for a long time. It is now widely used, and it deserves to be marked as the mature and stable library that it is.

Added

  • Support for Python 3.10

Fixed

  • Warning in pytest8 (thanks @amolenaar)
  • Spelling errors in documentation
xdoctest - Version 0.15.10

Published by Erotemic about 3 years ago

Version 0.15.10 - Released 2021-10-06

Changed

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

Fixed

  • Fix issue #112 --analysis=dynamic argument is now respected
xdoctest - Version 0.15.9

Published by Erotemic about 3 years ago

Changed

  • Added GitHub actions to the CI
  • Disabled workaround 16806 in Python 3.8+
  • New CI GPG Keys: Erotemic-CI: 70858F4D01314BF21427676F3D568E6559A34380 for
    reference the old signing key was 98007794ED130347559354B1109AC852D297D757.

Fixed

  • Fixed minor test failures
  • Fixed #106 - an issue to do with compiling multiline statements in single mode.
  • Fixed #108 - an issue to do with compiling semicolon token in eval mode.
xdoctest - 0.15.8

Published by Erotemic about 3 years ago

Version 0.15.8 - Released 2021-09-02

Changed

  • Removed the distracting and very long internal traceback that occurred in
    pytest when a module errors while it is being imported before the doctest is
    run.
  • Pytest now defaults to --xdoctest-verbose=2 by default (note this does
    nothing unless -s is also given so pytest does not supress output)
xdoctest - 0.15.17

Published by Erotemic about 3 years ago

Yanked - contained debug print statements

xdoctest - 0.15.6

Published by Erotemic about 3 years ago

Changed

  • Directive syntax errors are now handled as doctest runtime errors and return better debugging information.
  • README and docs were improved
xdoctest - Version 0.15.5

Published by Erotemic over 3 years ago

Version 0.15.5 - Released 2021-06-27

Changed

  • Better message when a pytest skip or exit-test-exception occurs

Fixed

  • Suppressed warning about using internal FixtureRequest
Package Rankings
Top 37.75% on Conda-forge.org
Top 3.04% on Pypi.org
Top 7.6% on Proxy.golang.org