xdoctest(1)

πŸ“¦
version 1.3.0 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– xdoctest πŸ’–

okay so bestie, welcome to xdoctest β€” the manual page, the whole vibe, the entire moment. it's a rewrite of Python's builtin doctest module, except instead of REGEX it uses AST. yes. that's the whole personality. slay. πŸŽ€


✨ NAME ✨

xdoctest β€” Rewrite of Python's builtin doctest module with AST instead of REGEX

like. that's it. that's the name. short, iconic, to the point. πŸ‘‘


🌸 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 ...]

copy that exactly bestie, character for character, no editing, no nothing. 🫢


πŸ’… DESCRIPTION πŸ’…

okay so the xdoctest package is a re-write of Python's builtin doctest module. the way that it does this? it replaces the old regex-based parser with a brand new abstract-syntax-tree based parser (using Python's ast module). no cap.

and the goal, the whole reason she exists, is literally:

  • make doctests easier to write
  • make them simpler to configure
  • and encourage the pattern of test driven development πŸ¦‹

it's giving main character energy fr fr.


⭐ OPTIONS ⭐

  • -h, --help β€” show this help message and exit. the classic. the moment. πŸ™ˆ
  • --version β€” 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)
  • --time β€” Same as if durations=0 (default: False)
  • --colored COLORED β€” 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)
  • --options OPTIONS β€” 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)
  • --verbose VERBOSE β€” 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
lowkey important bestie: yes, --supress-import-errors is spelled like that in the real option name. do NOT "fix" it, do not rename it, just type it exactly how she wrote it. πŸ’€

πŸ› REPORTING BUGS πŸ›

found a bug? bestie that's not a vibe. 😭 please go visit the riscemu issues tracking system at:

https://github.com/Erotemic/xdoctest/issues

they will absolutely handle it. periodt. πŸ”₯


🧚 AUTHORS 🧚

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


🌈 SEE ALSO 🌈

okay so there isn't like an actual SEE ALSO section in this one, so consider this your honorary one: go read the rest of the docs, go write some doctests, go be the main character. iykyk. πŸ’œ


and that's the whole page bestie!! ✨ this was xdoctest version 1.3.0, dated 22 December 2025, coming to you straight from the xdoctest manual. mwah. go run some tests. πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from