def test_otherTypesUnequal(self):
        """
        L{URL} is unequal (C{!=}) to other types.
        """
        u = URL.fromText('http://localhost/')
        self.assertTrue(u != 42, "URL must differ from a number.")
        self.assertTrue(u != object(), "URL must be differ from an object.")

        L{URL} is unequal (C{!=}) to other types.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_url.py