fail* methods have been removed in 3.12 (deprecated since 3.1!)

This commit is contained in:
Itamar Turner-Trauring 2023-11-15 12:14:47 -05:00
parent 4b75b7c6e8
commit ffe0979ad5

View File

@ -1352,6 +1352,14 @@ class _TestCaseMixin(object):
def assertRaises(self, *a, **kw): def assertRaises(self, *a, **kw):
return self._dummyCase.assertRaises(*a, **kw) return self._dummyCase.assertRaises(*a, **kw)
def failUnless(self, *args, **kwargs):
"""Backwards compatibility method."""
self.assertTrue(*args, **kwargs)
def failIf(self, *args, **kwargs):
"""Backwards compatibility method."""
self.assertFalse(*args, **kwargs)
class SyncTestCase(_TestCaseMixin, TestCase): class SyncTestCase(_TestCaseMixin, TestCase):
""" """