def port(self, portNumber, factory, interface):
        """
        Create, start, and return a new L{Port}, also tracking it so it can
        be stopped in the test tear down.
        """
        p = Port(portNumber, factory, interface=interface)
        p.startListening()
        self.ports.append(p)
        return p

        Create, start, and return a new L{Port}, also tracking it so it can
        be stopped in the test tear down.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_tcp_internals.py