def test_writeSequenceWithUnicodeRaisesException(self):
        """
        C{writeSequence} with an element in the sequence of type unicode raises
        C{TypeError}.
        """

        def connected(protocols):
            client, server, port = protocols

            exc = self.assertRaises(
                TypeError,
                server.transport.writeSequence, [u"Unicode is not kosher"])

            self.assertEqual(str(exc), "Data must not be unicode")

            server.transport.loseConnection()

        reactor = self.buildReactor()
        d = self.getConnectedClientAndServer(reactor, "127.0.0.1",
                                             socket.AF_INET)
        d.addCallback(connected)
        d.addErrback(log.err)
        self.runReactor(reactor)

        C{writeSequence} with an element in the sequence of type unicode raises
        C{TypeError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_tcp.py