class documentation

class twisted.internet.testing.EventLoggingObserver(Sequence): (source)

Implements interfaces: twisted.logger.ILogObserver

View In Hierarchy

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.

Method __init__ Undocumented
Method __len__ Undocumented
Method __getitem__ Undocumented
Method __iter__ Undocumented
Method __call__
Class Method createWithCleanup Create an EventLoggingObserver instance that observes the provided publisher and will be cleaned up with addCleanup().
Instance Variable _events The events captured by this observer
_events = (source)
The events captured by this observer
(type: list)
def __init__(self): (source)

Undocumented

def __len__(self): (source)

Undocumented

def __getitem__(self, index): (source)

Undocumented

def __iter__(self): (source)

Undocumented

def __call__(self, event): (source)
@classmethod
def createWithCleanup(cls, testInstance, publisher): (source)

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

ParameterstestInstanceTest instance in which this logger is used. (type: twisted.trial.unittest.TestCase)
publisherLog publisher to observe. (type: twisted.logger.LogPublisher)
ReturnsAn EventLoggingObserver configured to observe the provided publisher. (type: twisted.test.proto_helpers.EventLoggingObserver)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.