def test_equality(self):
        """
        Two URLs decoded using L{URL.fromText} will be equal (C{==}) if they
        decoded same URL string, and unequal (C{!=}) if they decoded different
        strings.
        """
        urlpath = URL.fromText(theurl)
        self.assertEqual(urlpath, URL.fromText(theurl))
        self.assertNotEqual(
            urlpath,
            URL.fromText('ftp://www.anotherinvaliddomain.com/'
                         'foo/bar/baz/?zot=21&zut')
        )

        Two URLs decoded using L{URL.fromText} will be equal (C{==}) if they
        decoded same URL string, and unequal (C{!=}) if they decoded different
        strings.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_url.py