Scroll to navigation

xdoctest(1) xdoctest xdoctest(1)

NAME

xdoctest - Rewrite of Python's builtin doctest module with AST instead of REGEX

SYNOPSIS


xdoctest [-h] [--version] [-m MODNAME] [-c COMMAND] [--style {auto,google,freeform}] [--analysis {auto,static,dynamic}]
[--durations DURATIONS] [--time] [--colored COLORED] [--nocolor] [--offset]
[--report {none,cdiff,ndiff,udiff,only_first_failure}] [--options OPTIONS] [--global-exec GLOBAL_EXEC]
[--supress-import-errors] [--verbose VERBOSE] [--quiet] [--silent]
[arg ...]

DESCRIPTION

The ``xdoctest`` package is a re-write of Python's builtin ``doctest`` module. It replaces the old regex-based parser with a new abstract-syntax-tree based parser (using Python's ``ast`` module). The goal is to make doctests easier to write, simpler to configure, and encourage the pattern of test driven development.

OPTIONS

show this help message and exit
Display version info and quit (default: False) -m MODNAME, --modname MODNAME Module name or path. If specified positional modules are ignored (default: None) -c COMMAND, --command COMMAND A doctest name or a command (all|list|dump|<callname>). Defaults to `all` (which runs everything). Using `list` will collect and print all doctests. Using `dump` will convert doctests into unit tests. Anything else will be interpreted as a "callname" (default: None) --style {auto,google,freeform} Choose the style of doctests that will be parsed (default: auto) --analysis {auto,static,dynamic} How doctests are collected (default: auto) --durations DURATIONS Specify execution times for slowest N tests.N=0 will show times for all tests (default: None)
Same as if durations=0 (default: False)
Enable or disable ANSI coloration in stdout (default: True)
Disable ANSI coloration in stdout
If True formatted source linenumbers will agree with their location in the source file. Otherwise they will be relative to the doctest itself. (default: False) --report {none,cdiff,ndiff,udiff,only_first_failure} Choose another output format for diffs on xdoctest failure (default: udiff)
Default directive flags for doctests (default: None) --global-exec GLOBAL_EXEC Custom Python code to execute before every test (default: None) --supress-import-errors Removes tracebacks from errors in implicit imports (default: False)
Verbosity level. 0 is silent, 1 prints out test names, 2 additionally prints test stdout, 3 additionally prints test source (default: 3)
sets verbosity to 1
sets verbosity to 0

REPORTING BUGS

To report a bug please visit riscemu issues tracking system at: https://github.com/Erotemic/xdoctest/issues

AUTHORS

This manual page was written by Bo YU <tsu.yubo@gmail.com> for the Debian project (but may be used by others).

18 March 2024 1.1.3