mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	convert old fail* assertions to assert*
This commit is contained in:
		
							parent
							
								
									98d23f2e06
								
							
						
					
					
						commit
						c9c0f201fe
					
				
					 275 changed files with 4540 additions and 4540 deletions
				
			
		| 
						 | 
				
			
			@ -11,7 +11,7 @@ def test_constructors(self):
 | 
			
		|||
        self.assertEqual(tuple(), ())
 | 
			
		||||
        t0_3 = (0, 1, 2, 3)
 | 
			
		||||
        t0_3_bis = tuple(t0_3)
 | 
			
		||||
        self.assert_(t0_3 is t0_3_bis)
 | 
			
		||||
        self.assertTrue(t0_3 is t0_3_bis)
 | 
			
		||||
        self.assertEqual(tuple([]), ())
 | 
			
		||||
        self.assertEqual(tuple([0, 1, 2, 3]), (0, 1, 2, 3))
 | 
			
		||||
        self.assertEqual(tuple(''), ())
 | 
			
		||||
| 
						 | 
				
			
			@ -19,8 +19,8 @@ def test_constructors(self):
 | 
			
		|||
 | 
			
		||||
    def test_truth(self):
 | 
			
		||||
        super().test_truth()
 | 
			
		||||
        self.assert_(not ())
 | 
			
		||||
        self.assert_((42, ))
 | 
			
		||||
        self.assertTrue(not ())
 | 
			
		||||
        self.assertTrue((42, ))
 | 
			
		||||
 | 
			
		||||
    def test_len(self):
 | 
			
		||||
        super().test_len()
 | 
			
		||||
| 
						 | 
				
			
			@ -33,14 +33,14 @@ def test_iadd(self):
 | 
			
		|||
        u = (0, 1)
 | 
			
		||||
        u2 = u
 | 
			
		||||
        u += (2, 3)
 | 
			
		||||
        self.assert_(u is not u2)
 | 
			
		||||
        self.assertTrue(u is not u2)
 | 
			
		||||
 | 
			
		||||
    def test_imul(self):
 | 
			
		||||
        super().test_imul()
 | 
			
		||||
        u = (0, 1)
 | 
			
		||||
        u2 = u
 | 
			
		||||
        u *= 3
 | 
			
		||||
        self.assert_(u is not u2)
 | 
			
		||||
        self.assertTrue(u is not u2)
 | 
			
		||||
 | 
			
		||||
    def test_tupleresizebug(self):
 | 
			
		||||
        # Check that a specific bug in _PyTuple_Resize() is squashed.
 | 
			
		||||
| 
						 | 
				
			
			@ -71,7 +71,7 @@ def test_hash(self):
 | 
			
		|||
        inps = base + [(i, j) for i in base for j in xp] + \
 | 
			
		||||
                     [(i, j) for i in xp for j in base] + xp + list(zip(base))
 | 
			
		||||
        collisions = len(inps) - len(set(map(hash, inps)))
 | 
			
		||||
        self.assert_(collisions <= 15)
 | 
			
		||||
        self.assertTrue(collisions <= 15)
 | 
			
		||||
 | 
			
		||||
    def test_repr(self):
 | 
			
		||||
        l0 = tuple()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue