tests.test_exceptions
Module Contents
Classes
Test suite for validating the behavior of exception classes in the multicast package. |
Data
API
- tests.test_exceptions.__module__[source]
‘tests’
- class tests.test_exceptions.ExceptionsTestSuite(methodName='runTest')[source][source]
Bases:
context.BasicUsageTestSuiteTest suite for validating the behavior of exception classes in the multicast package.
This suite focuses on testing the CommandExecutionError class, verifying its initialization with different arguments and proper error propagation.
Initialization
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- __module__[source]
‘tests.test_exceptions’
- __name__[source]
‘tests.test_exceptions.ExceptionsTestSuite’
- test_command_execution_error_with_args()[source][source]
Test CommandExecutionError initialization with custom message and exit code.
Verifies that both the message and exit code are correctly assigned when explicitly provided during initialization.
- test_command_execution_error_default_exit_code()[source][source]
Test CommandExecutionError initialization with default exit code.
Verifies that the exit code defaults to 1 when only a message is provided.
- test_command_execution_error_with_cause()[source][source]
Test CommandExecutionError initialization with a cause.
Verifies that the error properly chains exceptions when initialized with a cause, maintaining both the cause reference and custom attributes.
- test_shutdown_received_error_with_args()[source][source]
Test ShutdownCommandReceived initialization with custom message and exit code.
Verifies that both the message and exit code are correctly assigned when explicitly provided during initialization.
- test_shutdown_received_error_default_exit_code()[source][source]
Test ShutdownCommandReceived initialization with default exit code.
Verifies that the exit code defaults to 143 when only a message is provided.