def test_keepsIfFalse(self):
        """
        L{util._replaceIf} keeps the original body of the function if the
        conditional is C{False}.
        """
        @util._replaceIf(False, lambda: "hi")
        def test():
            return "bye"

        self.assertEqual(test(), "bye")

        L{util._replaceIf} keeps the original body of the function if the
        conditional is C{False}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_util.py