Known subclasses: twisted.python.test.test_systemd.EnvironmentTests

Mixin for a TestCase subclass which creates a real implementation of inheritedDescriptors which is based on the environment variables set by systemd. To facilitate testing, this mixin will also create a fake environment dictionary and add keys to it to make it look as if some descriptors have been inherited.

Method initializeEnvironment Create a copy of the process environment and add LISTEN_FDS and LISTEN_PID (the environment variables set by systemd) to it.
Method getDaemon No summary
def initializeEnvironment(self, count, pid):

Create a copy of the process environment and add LISTEN_FDS and LISTEN_PID (the environment variables set by systemd) to it.

def getDaemon(self, start, count):

Create a new ListenFDs instance, initialized with a fake environment dictionary which will be set up as systemd would have set it up if count descriptors were being inherited. The descriptors will also start at start.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.