mirror of
				https://github.com/Mikaela/Limnoria.git
				synced 2025-10-31 23:57:22 +01:00 
			
		
		
		
	Use the 'reverse' parameter of sorted() instead of 'mycmp'.
This commit is contained in:
		
							parent
							
								
									a731841af8
								
							
						
					
					
						commit
						16aeaaa4fe
					
				| @ -145,9 +145,7 @@ class GenTest(SupyTestCase): | ||||
|         L = ['a', 'c', 'b'] | ||||
|         self.assertEqual(sorted(L), ['a', 'b', 'c']) | ||||
|         self.assertEqual(L, ['a', 'c', 'b']) | ||||
|         def mycmp(x, y): | ||||
|             return -cmp(x, y) | ||||
|         self.assertEqual(sorted(L, mycmp), ['c', 'b', 'a']) | ||||
|         self.assertEqual(sorted(L, reverse=True), ['c', 'b', 'a']) | ||||
| 
 | ||||
|     def testTimeElapsed(self): | ||||
|         self.assertRaises(ValueError, utils.timeElapsed, 0, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Valentin Lorentz
						Valentin Lorentz