mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Remove unittest methods scheduled for removal in 3.3 -- makes the unittest test suite pass again.
This commit is contained in:
parent
fa2c61a222
commit
2cebdd4865
5 changed files with 9 additions and 152 deletions
|
@ -19,17 +19,12 @@ 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)
|
||||
# unittest warnings will be printed at most once per type
|
||||
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