def test_invalidInterface(self):
        """
        An L{InvalidAddressError} is raised when trying to listen on an address
        that isn't a valid IPv4 or IPv6 address.
        """
        reactor = self.buildReactor()
        self.assertRaises(
            error.InvalidAddressError, reactor.listenUDP, DatagramProtocol(),
            0, interface='example.com')

        An L{InvalidAddressError} is raised when trying to listen on an address
        that isn't a valid IPv4 or IPv6 address.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_udp.py