def test_repr(self):
        """
        The string representation of a L{TunnelAddress} instance includes the
        class name and the values of the C{type} and C{name} attributes.
        """
        if _PY3:
            self.assertRegex(
                repr(TunnelAddress(TunnelFlags.IFF_TUN, name=b"device")),
                "TunnelAddress type=IFF_TUN name=b'device'>")
        else:
            self.assertEqual(
                "<TunnelAddress type=IFF_TUN name='device'>",
                repr(TunnelAddress(TunnelFlags.IFF_TUN, name=b"device")))

        The string representation of a L{TunnelAddress} instance includes the
        class name and the values of the C{type} and C{name} attributes.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/pair/test/test_tuntap.py