main#

main(argv: list[str] | None = None) int#

Perform an in-process test run.

Parameters:

args – List of command line arguments. If None or not given, defaults to reading arguments directly from the process command line (sys.argv).

Returns:

An exit code.

class CanaryMain(argv: list[str] | None = None)#

Bases: object

Set up and teardown this canary session

invoke_command(command: CanarySubcommand, args: Namespace) int#
cmdline_parse(parser: Parser, args: list[str]) Namespace#
class Profiler(nlines: int = -1)#

Bases: object

invoke_profiled_command(command, args)#
determine_plugin_from_tb(tb: StackSummary) None | Any#

Determine if the exception was raised inside a plugin

print_banner() None#
print_current_config() None#
console_main() int#

The CLI entry point of canary.

This function is not meant for programmable use; use main() instead.