mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Revert "bpo-45162: Revert "Remove many old deprecated unittest features"" (GH-92556)
This reverts commit b50322d203
.
This commit is contained in:
parent
38612a05b5
commit
c834c02569
14 changed files with 78 additions and 373 deletions
|
@ -18,17 +18,6 @@ def warnfun():
|
|||
warnings.warn('rw', RuntimeWarning)
|
||||
|
||||
class TestWarnings(unittest.TestCase):
|
||||
# unittest warnings will be printed at most once per type (max one message
|
||||
# for the fail* methods, and one for the assert* methods)
|
||||
def test_assert(self):
|
||||
self.assertEquals(2+2, 4)
|
||||
self.assertEquals(2*2, 4)
|
||||
self.assertEquals(2**2, 4)
|
||||
|
||||
def test_fail(self):
|
||||
self.failUnless(1)
|
||||
self.failUnless(True)
|
||||
|
||||
def test_other_unittest(self):
|
||||
self.assertAlmostEqual(2+2, 4)
|
||||
self.assertNotAlmostEqual(4+4, 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue