Zachary Ware <zachary.w...@gmail.com> added the comment:
`unittest.TestCase.assertTrue` is simple enough (the entire implementation is copied below) that there is almost no way for it to fail to raise some kind of exception when its first argument is not truthy: def assertTrue(self, expr, msg=None): """Check that the expression is true.""" if not expr: msg = self._formatMessage(msg, "%s is not true" % safe_repr(expr)) raise self.failureException(msg) This basically hasn't changed in the 19 years since the unittest module was added (though variously at times named `assert_` or `failUnless`), so I'm going to go ahead and close the issue. ---------- nosy: +zach.ware resolution: -> works for me stage: -> resolved status: open -> closed title: unittest.TestCase.asserTrue return True even if the expr is False -> unittest.TestCase.assertTrue return True even if the expr is False _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40761> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com