logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Authors

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

1.2.0                                           29 September 2024                                    xdoctest(1)

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.

Name

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

Options

-h,--help
              show this help message and exit

       --version
              Display version info and quit (default: False) -mMODNAME, --modnameMODNAME Module name or  path.
              If  specified  positional  modules  are  ignored  (default:  None) -cCOMMAND, --commandCOMMAND 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) --durationsDURATIONS Specify
              execution times for slowest N tests.N=0 will show times for all tests (default: None)

       --time Same as if durations=0 (default: False)

       --coloredCOLORED
              Enable or disable ANSI coloration in stdout (default: True)

       --nocolor
              Disable ANSI coloration in stdout

       --offset
              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)

       --optionsOPTIONS
              Default  directive flags for doctests (default: None) --global-execGLOBAL_EXEC Custom Python code
              to execute before every test  (default:  None)  --supress-import-errors  Removes  tracebacks  from
              errors in implicit imports (default: False)

       --verboseVERBOSE
              Verbosity  level.  0  is  silent,  1  prints  out test names, 2 additionally prints test stdout, 3
              additionally prints test source (default: 3)

       --quiet
              sets verbosity to 1

       --silent
              sets verbosity to 0

Reporting Bugs

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

Synopsis

xdoctest  [-h] [--version] [-mMODNAME] [-cCOMMAND] [--style {auto,google,freeform}] [--analysis {auto,static,dynamic}]
                 [--durationsDURATIONS] [--time] [--coloredCOLORED] [--nocolor] [--offset]
                 [--report {none,cdiff,ndiff,udiff,only_first_failure}] [--optionsOPTIONS] [--global-execGLOBAL_EXEC]
                 [--supress-import-errors] [--verboseVERBOSE] [--quiet] [--silent]
                 [arg ...]

See Also