mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 07:04:12 +00:00 
			
		
		
		
	Inherit RulesNamesList from list
				
					
				
			This commit is contained in:
		| @@ -3,11 +3,11 @@ from thefuck.main import Rule | ||||
| from thefuck import conf | ||||
|  | ||||
|  | ||||
| def test_rules_list(): | ||||
|     assert conf.RulesList(['bash', 'lisp']) == ['bash', 'lisp'] | ||||
|     assert conf.RulesList(['bash', 'lisp']) == conf.RulesList(['bash', 'lisp']) | ||||
|     assert Rule('lisp', None, None, False) in conf.RulesList(['lisp']) | ||||
|     assert Rule('bash', None, None, False) not in conf.RulesList(['lisp']) | ||||
| def test_rules_names_list(): | ||||
|     assert conf.RulesNamesList(['bash', 'lisp']) == ['bash', 'lisp'] | ||||
|     assert conf.RulesNamesList(['bash', 'lisp']) == conf.RulesNamesList(['bash', 'lisp']) | ||||
|     assert Rule('lisp', None, None, False) in conf.RulesNamesList(['lisp']) | ||||
|     assert Rule('bash', None, None, False) not in conf.RulesNamesList(['lisp']) | ||||
|  | ||||
|  | ||||
| def test_default(): | ||||
|   | ||||
| @@ -32,7 +32,7 @@ def test_get_rules(): | ||||
|                    main.Rule('lisp', 'lisp', 'lisp', True)] | ||||
|         assert list(main.get_rules( | ||||
|             Path('~'), | ||||
|             Mock(rules=conf.RulesList(['bash'])))) \ | ||||
|             Mock(rules=conf.RulesNamesList(['bash'])))) \ | ||||
|                == [main.Rule('bash', 'bash', 'bash', True), | ||||
|                    main.Rule('bash', 'bash', 'bash', True)] | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user