def test_childInitRoot(self):
        """
        L{URL.child} of a L{URL} without a path produces a L{URL} with a single
        path segment.
        """
        childURL = URL(host=u"www.foo.com").child(u"c")
        self.assertTrue(childURL.rooted)
        self.assertEqual("http://www.foo.com/c", childURL.asText())

        L{URL.child} of a L{URL} without a path produces a L{URL} with a single
        path segment.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_url.py