'Setting attributes on L{urlpath.URLPath} should change the value
returned by L{str}.
@param stringType: a callable to parameterize this test for different
text types.
@type stringType: 1-argument callable taking L{unicode} and returning
L{str} or L{bytes}.'

def test_mutabilityWithText(self, stringType=type(u'')):

    self.path.scheme = stringType(u'https')
    self.assertEqual(str(self.path), 'https://example.com/foo/bar?yes=no&no=yes#footer')
    self.path.netloc = stringType(u'another.example.invalid')
    self.assertEqual(str(self.path), 'https://another.example.invalid/foo/bar?yes=no&no=yes#footer')
    self.path.path = stringType(u'/hello')
    self.assertEqual(str(self.path), 'https://another.example.invalid/hello?yes=no&no=yes#footer')
    self.path.query = stringType(u'alpha=omega&opposites=same')
    self.assertEqual(str(self.path), 'https://another.example.invalid/hello?alpha=omega&opposites=same#footer')
    self.path.fragment = stringType(u'header')
    self.assertEqual(str(self.path), 'https://another.example.invalid/hello?alpha=omega&opposites=same#header')
