def test_unicode(self):
        """
        C{compat.unicode} is C{str} on Python 3, C{unicode} on Python 2.
        """
        if _PY3:
            expected = str
        else:
            expected = unicode
        self.assertIs(unicodeCompat, expected)

        C{compat.unicode} is C{str} on Python 3, C{unicode} on Python 2.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_compat.py