def test_technicallyTextIsIterableBut(self):
        """
        Technically, L{str} (or L{unicode}, as appropriate) is iterable, but
        C{URL(path="foo")} resulting in C{URL.fromText("f/o/o")} is never what
        you want.
        """
        with self.assertRaises(TypeError) as raised:
            URL(path=u'foo')
        self.assertEqual(
            str(raised.exception),
            "expected iterable of text for path, not: {}"
            .format(repr(u'foo'))
        )

        Technically, L{str} (or L{unicode}, as appropriate) is iterable, but
        C{URL(path="foo")} resulting in C{URL.fromText("f/o/o")} is never what
        you want.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_url.py