hazwaz.unittest module

class hazwaz.unittest.HazwazTestCase(methodName='runTest')[source]

Bases: TestCase

run_with_argv(cmd, argv: List[str]) Dict[str, StringIO][source]

Run a command with a list of command line options.


argv – the full command line except for the program name, as a list of strings; e.g. ["subcommand", "--help"] or ["subcommand", "--option", "value"].


stdout and stderr resulting from the command.

class hazwaz.unittest.TestCommand(test_cases: Iterable[TestCase])[source]

Bases: Command

Run unittests.


Main code of this subcommand.

Override this method to implement the actual program.

name: Optional[str] = 'test'

The name used to call this subcommand from the command line.

If this property is none, the default is the name of the class set to lowercase.