OS Manuals

/opt/synapse/bin/trial

Matrix reference homeserver

From synapse 1.164.2-r0 (enterprise-packages), captured 2026-11-08 by running trial --help (exit 0). permalink

trial [options] [[file|package|module|TestCase|testmethod]...]

Options:
  -B, --debug-stacktraces  Report Deferred creation and callback stack traces
  -N, --no-recurse         Don't recurse into packages
  -b, --debug              Run tests in a debugger. If that debugger is pdb, will load '.pdbrc' from
                           current directory if it exists.
      --coverage           Generate coverage information in the coverage file in the directory
                           specified by the temp-directory option.
      --debugger=          the fully qualified name of a debugger to use if --debug is passed
                           [default: pdb]
      --disablegc          Disable the garbage collector
  -e, --rterrors           realtime errors, print out tracebacks as soon as they occur
      --force-gc           Have Trial run gc.collect() before and after each test case.
  -h, --help               Display this help and exit.
      --help-orders        Help on available test running orders
      --help-reactors      Display a list of possibly available reactor names.
      --help-reporters     Help on available output plugins (reporters)
  -j, --jobs=              Number of local workers to run, a strictly positive integer or 'auto' to
                           spawn one worker for each available CPU.
  -l, --logfile=           log file name [default: test.log]
  -n, --dry-run            do everything but run the tests
      --nopm               don't automatically jump into debugger for postmorteming of exceptions
  -o, --order=             Specify what order to run test cases and methods. See --help-orders for
                           more info.
      --profile            Run tests under the Python profiler
  -r, --reactor=           Which reactor to use (see --help-reactors for a list of possibilities)
      --recursionlimit=    see sys.setrecursionlimit()
      --reporter=          The reporter to use for this test run.  See --help-reporters for more
                           info. [default: verbose]
      --spew               Print an insanely verbose log of everything that happens.  Useful when
                           debugging freezes or locks in complex code.
      --tbformat=          Specify the format to display tracebacks with. Valid formats are 'plain',
                           'emacs', and 'cgitb' which uses the nicely verbose stdlib cgitb.text
                           function
      --temp-directory=    Path to use as working directory for tests. [default: _trial_temp]
      --testmodule=        Filename to grep for test cases (-*- test-case-name).
  -u, --until-failure      Repeat test until it fails
      --unclean-warnings   Turn dirty reactor errors into warnings
      --version            Display Twisted version and exit.
      --without-module=    Fake the lack of the specified modules, separated with commas.
  -x, --exitfirst          Exit after the first non-successful result (cannot be specified along
                           with --jobs).
  -z, --random=            Run tests in random order using the specified seed

trial loads and executes a suite of unit tests, obtained from modules, packages and files listed on
the command line.
Options (31)
OptionDescriptionSource
-B, --debug-stacktracesReport Deferred creation and callback stack traceshelp
-N, --no-recurseDon't recurse into packageshelp
-b, --debugRun tests in a debugger.help
--coverageGenerate coverage information in the coverage file in the directory specified by the temp-directory option.help
--debuggerthe fully qualified name of a debugger to use if --debug is passed [default: pdb]help
--disablegcDisable the garbage collectorhelp
-e, --rterrorsrealtime errors, print out tracebacks as soon as they occurhelp
--force-gcHave Trial run gc.collect() before and after each test case.help
-h, --helpDisplay this help and exit.help
--help-ordersHelp on available test running ordershelp
--help-reactorsDisplay a list of possibly available reactor names.help
--help-reportersHelp on available output plugins (reporters)help
-j, --jobsNumber of local workers to run, a strictly positive integer or 'auto' to spawn one worker for each available CPU.help
-l, --logfilelog file name [default: test.log]help
-n, --dry-rundo everything but run the testshelp
--nopmdon't automatically jump into debugger for postmorteming of exceptionshelp
-o, --orderSpecify what order to run test cases and methods.help
--profileRun tests under the Python profilerhelp
-r, --reactorWhich reactor to use (see --help-reactors for a list of possibilities)help
--recursionlimitsee sys.setrecursionlimit()help
--reporterThe reporter to use for this test run.help
--spewPrint an insanely verbose log of everything that happens.help
--tbformatSpecify the format to display tracebacks with.help
--temp-directoryPath to use as working directory for tests.help
--testmoduleFilename to grep for test cases (-*- test-case-name).help
-u, --until-failureRepeat test until it failshelp
--unclean-warningsTurn dirty reactor errors into warningshelp
--versionDisplay Twisted version and exit.help
--without-moduleFake the lack of the specified modules, separated with commas.help
-x, --exitfirstExit after the first non-successful result (cannot be specified along with --jobs).help
-z, --randomRun tests in random order using the specified seedhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.