def assertUnicoded(self, u):
        """
        The given L{URL}'s components should be L{unicode}.

        @param u: The L{URL} to test.
        """
        self.assertTrue(isinstance(u.scheme, unicode)
                        or u.scheme is None, repr(u))
        self.assertTrue(isinstance(u.host, unicode)
                        or u.host is None, repr(u))
        for seg in u.path:
            self.assertIsInstance(seg, unicode, repr(u))
        for (k, v) in u.query:
            self.assertIsInstance(k, unicode, repr(u))
            self.assertTrue(v is None or isinstance(v, unicode), repr(u))
        self.assertIsInstance(u.fragment, unicode, repr(u))

        The given L{URL}'s components should be L{unicode}.

        @param u: The L{URL} to test.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_url.py