'L{URL.sibling} of a L{URL} replaces the last path segment, but does not
affect the query or fragment.'

def test_sibling(self):

    urlpath = URL.fromText(theurl)
    self.assertEqual(u'http://www.foo.com/a/nice/path/sister?zot=23&zut', urlpath.sibling(u'sister').asText())
    theurl2 = u'http://www.foo.com/a/nice/path?zot=23&zut'
    urlpath = URL.fromText(theurl2)
    self.assertEqual(u'http://www.foo.com/a/nice/sister?zot=23&zut', urlpath.sibling(u'sister').asText())
