def _assertFalseTrue(self, method):
        """
        Perform the negative case test for C{failIf} or C{assertFalse}.

        @param method: The test method to test.
        """
        for true in [1, True, 'cat', [1,2], (3,4)]:
            try:
                method(true, "failed on %r" % (true,))
            except self.failureException as e:
                self.assertIn(
                    "failed on %r" % (true,), str(e),
                    "Raised incorrect exception on %r: %r" % (true, e)
                )
            else:
                self.fail(
                    "Call to %s(%r) didn't fail" % (method.__name__, true,)
                )

        Perform the negative case test for C{failIf} or C{assertFalse}.

        @param method: The test method to test.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_assertions.py