def test_equality(self):
        """
        A L{NamedConstant} instance compares equal to itself.
        """
        name = NamedConstant()
        name._realize(self.container, "bar", None)
        self.assertTrue(name == name)
        self.assertFalse(name != name)

        A L{NamedConstant} instance compares equal to itself.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_constants.py