def test_printableSingletons(self):
        """
        The IMAP4 modified UTF-7 implementation encodes all printable
        characters which are in ASCII using the corresponding ASCII byte.
        """
        # All printables represent themselves
        for o in chain(range(0x20, 0x26), range(0x27, 0x7f)):
            charbyte = chr(o).encode()
            self.assertEqual(charbyte, chr(o).encode('imap4-utf-7'))
            self.assertEqual(chr(o), charbyte.decode('imap4-utf-7'))
        self.assertEqual(u'&'.encode('imap4-utf-7'), b'&-')
        self.assertEqual(b'&-'.decode('imap4-utf-7'), u'&')

        The IMAP4 modified UTF-7 implementation encodes all printable
        characters which are in ASCII using the corresponding ASCII byte.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py