mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-30 22:54:14 +00:00 
			
		
		
		
	Make CorrectedCommand ignore priority when checking equality
				
					
				
			This commit is contained in:
		| @@ -44,3 +44,16 @@ class TestSortedCorrectedCommandsSequence(object): | ||||
|             settings) | ||||
|         assert set(seq) == {CorrectedCommand('ls', priority=100), | ||||
|                             CorrectedCommand('ls', side_effect, 300)} | ||||
|  | ||||
|  | ||||
| class TestCorrectedCommand(object): | ||||
|  | ||||
|     def test_equality(self): | ||||
|         assert CorrectedCommand('ls', None, 100) == \ | ||||
|                CorrectedCommand('ls', None, 200) | ||||
|         assert CorrectedCommand('ls', None, 100) != \ | ||||
|                CorrectedCommand('ls', lambda *_: _, 100) | ||||
|  | ||||
|     def test_hashable(self): | ||||
|         assert {CorrectedCommand('ls', None, 100), | ||||
|                 CorrectedCommand('ls', None, 200)} == {CorrectedCommand('ls')} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user