def test_timeout(self):
        """
        Make sure that when a TimeoutFactory accepts a connection, it will
        time out that connection if no data is read or written within the
        timeout period.
        """
        # Let almost 3 time units pass
        self.clock.pump([0.0, 0.5, 1.0, 1.0, 0.4])
        self.assertFalse(self.wrappedProto.disconnected)

        # Now let the timer elapse
        self.clock.pump([0.0, 0.2])
        self.assertTrue(self.wrappedProto.disconnected)

        Make sure that when a TimeoutFactory accepts a connection, it will
        time out that connection if no data is read or written within the
        timeout period.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_policies.py