@@ -2758,24 +2758,6 @@ def testEquality(self):
27582758 self .assertRaises (self .failureException , self .assertDictEqual , [], d )
27592759 self .assertRaises (self .failureException , self .assertDictEqual , 1 , 1 )
27602760
2761- self .assertSameElements ([1 , 2 , 3 ], [3 , 2 , 1 ])
2762- self .assertSameElements ([1 , 2 ] + [3 ] * 100 , [1 ] * 100 + [2 , 3 ])
2763- self .assertSameElements (['foo' , 'bar' , 'baz' ], ['bar' , 'baz' , 'foo' ])
2764- self .assertRaises (self .failureException , self .assertSameElements ,
2765- [10 ], [10 , 11 ])
2766- self .assertRaises (self .failureException , self .assertSameElements ,
2767- [10 , 11 ], [10 ])
2768-
2769- # Test that sequences of unhashable objects can be tested for sameness:
2770- self .assertSameElements ([[1 , 2 ], [3 , 4 ]], [[3 , 4 ], [1 , 2 ]])
2771-
2772- self .assertSameElements ([{'a' : 1 }, {'b' : 2 }], [{'b' : 2 }, {'a' : 1 }])
2773- self .assertRaises (self .failureException , self .assertSameElements ,
2774- [[1 ]], [[2 ]])
2775- self .assertRaises (self .failureException , self .assertSameElements ,
2776- [{'a' : 1 }, {'b' : 2 }], [{'b' : 2 }, {'a' : 2 }])
2777-
2778-
27792761 def testAssertItemsEqual (self ):
27802762 a = object ()
27812763 self .assertItemsEqual ([1 , 2 , 3 ], [3 , 2 , 1 ])
@@ -3032,7 +3014,8 @@ def testPendingDeprecationMethodNames(self):
30323014 (self .failIfAlmostEqual , (3.0 , 5.0 )),
30333015 (self .failUnless , (True ,)),
30343016 (self .failUnlessRaises , (TypeError , lambda _ : 3.14 + 'spam' )),
3035- (self .failIf , (False ,))
3017+ (self .failIf , (False ,)),
3018+ (self .assertSameElements , ([1 , 1 , 2 , 3 ], [1 , 2 , 3 ]))
30363019 )
30373020 for meth , args in old :
30383021 with warnings .catch_warnings (record = True ) as w :
0 commit comments