Undocumented
Class |
|
Options to the trial command line tool. |
Function | get |
Undocumented |
Function | is |
Returns true if 'filename' looks like a file containing unit tests. False otherwise. Doesn't care whether filename exists. |
Function | load |
Accepts a filename and attempts to load the Emacs variable declarations from that file, simulating what Emacs does. |
Function | run |
Undocumented |
Constant | TBFORMAT |
Undocumented |
Class | _ |
Basic options shared between trial and its local workers. |
Exception | _ |
A debugger import failed. |
Function | _auto |
Heuristically guess the number of job workers to run. |
Function | _check |
Check that the given order is a known test running order. |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _initial |
Undocumented |
Function | _make |
Return a trial runner class set up with the parameters extracted from config. |
Function | _maybe |
Try to find the source line of the given test thing. |
Function | _parse |
Accepts a single line in Emacs local variable declaration format and returns a dict of all the variables {name: value}. Raises ValueError if 'line' is in the wrong format. |
Function | _reporter |
Undocumented |
Function | _wrapped |
Wrap an instance of pdb.Pdb with readline support and load any .rcs. |
Variable | _run |
Undocumented |
Returns true if 'filename' looks like a file containing unit tests. False otherwise. Doesn't care whether filename exists.
Accepts a filename and attempts to load the Emacs variable declarations from that file, simulating what Emacs does.
See http://www.gnu.org/software/emacs/manual/html_node/File-Variables.html
Undocumented
Value |
|
Heuristically guess the number of job workers to run.
When ``os.process_cpu_count()`` is available (Python 3.13+), return the number of logical CPUs usable by the current process. This respects the ``PYTHON_CPU_COUNT`` environment variable and/or ``python -X cpu_count`` flag.
Otherwise, if ``os.sched_getaffinity()`` is available (on some Unixes) this returns the number of CPUs this process is restricted to, under the assumption that this affinity will be inherited.
Otherwise, consult ``os.cpu_count()`` to get the number of logical CPUs.
Failing all else, return 1.
Returns | |
int | A strictly positive integer. |
Check that the given order is a known test running order.
Does nothing else, since looking up the appropriate callable to sort the tests should be done when it actually will be used, as the default argument will not be coerced by this function.
Parameters | |
order | one of the known orders in _runOrders |
Returns | |
the order unmodified |
Return a trial runner class set up with the parameters extracted from config.
Returns | |
runner._Runner | A trial runner instance. |
Try to find the source line of the given test thing.
Parameters | |
testTestCase , test method, or module, though only the former two have a chance to succeed | the test item to attempt to inspect |
Returns | |
int | the starting source line, or -1 if one couldn't be found |