xdoctest(1)
π 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 toall(which runs everything). Usinglistwill collect and print all doctests. Usingdumpwill 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=0will show times for all tests (default:None)--timeβ Same as ifdurations=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.0is silent,1prints out test names,2additionally prints test stdout,3additionally prints test source (default:3)--quietβ sets verbosity to1--silentβ sets verbosity to0
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
- ubuntu resolute: xdoctest 1.3.0-1 Β· Apache-2.0
- ubuntu stonking: xdoctest 1.3.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms