def test_decodeWithErrors(self):
        """
        Similar to L{test_encodeWithErrors}, but for C{bytes.decode}.
        """
        bytes = b'Hello world'
        self.assertEqual(
            smtp.xtext_decode(bytes, 'strict'),
            (bytes.decode('xtext'), len(bytes)))
        self.assertEqual(
            bytes.decode('xtext', 'strict'),
            bytes.decode('xtext'))

        Similar to L{test_encodeWithErrors}, but for C{bytes.decode}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_smtp.py