'L{URL.asText} should invert L{URL.fromText}.'

def test_roundtrip(self):

    tests = (u'http://localhost', u'http://localhost/', u'http://localhost/foo', u'http://localhost/foo/', u'http://localhost/foo!!bar/', u'http://localhost/foo%20bar/', u'http://localhost/foo%2Fbar/', u'http://localhost/foo?n', u'http://localhost/foo?n=v', u'http://localhost/foo?n=/a/b', u'http://example.com/foo!@$bar?b!@z=123', u'http://localhost/asd?a=asd%20sdf/345', u'http://(%2525)/(%2525)?(%2525)&(%2525)=(%2525)#(%2525)', u'http://(%C3%A9)/(%C3%A9)?(%C3%A9)&(%C3%A9)=(%C3%A9)#(%C3%A9)')
    for test in tests:
        result = URL.fromText(test).asText()
        self.assertEqual(test, result)
