class documentation

ILogObserver That stores its events in a list for later inspection. This class is similar to LimitedHistoryLogObserver save that the internal buffer is public and intended for external inspection. The observer implements the sequence protocol to ease iteration of the events.

Class Method createWithCleanup Create an EventLoggingObserver instance that observes the provided publisher and will be cleaned up with addCleanup().
Method __call__ No summary
Method __getitem__ Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Instance Variable _events The events captured by this observer
@classmethod
def createWithCleanup(cls, testInstance: TestCase, publisher: LogPublisher) -> Self: (source)

Create an EventLoggingObserver instance that observes the provided publisher and will be cleaned up with addCleanup().

Parameters
testInstance:twisted.trial.unittest.TestCaseTest instance in which this logger is used.
publisher:twisted.logger.LogPublisherLog publisher to observe.
Returns
twisted.test.proto_helpers.EventLoggingObserverAn EventLoggingObserver configured to observe the provided publisher.
@overload
def __getitem__(self, index: int) -> LogEvent:
@overload
def __getitem__(self, index: slice) -> Sequence[LogEvent]:
(source)

Undocumented

def __init__(self): (source)

Undocumented

def __iter__(self) -> Iterator[LogEvent]: (source)

Undocumented

def __len__(self) -> int: (source)

Undocumented

The events captured by this observer