mirror of
https://github.com/nvbn/thefuck.git
synced 2025-07-20 05:53:25 +01:00
Fix tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
from mock import Mock
|
||||
import six
|
||||
from thefuck.utils import wrap_settings, \
|
||||
from thefuck.utils import default_settings, \
|
||||
memoize, get_closest, get_all_executables, replace_argument, \
|
||||
get_all_matched_commands, is_app, for_app, cache
|
||||
from thefuck.types import Settings
|
||||
@@ -12,9 +12,9 @@ from tests.utils import Command
|
||||
({'key': 'val'}, {}, {'key': 'val'}),
|
||||
({'key': 'new-val'}, {'key': 'val'}, {'key': 'val'}),
|
||||
({'key': 'new-val', 'unset': 'unset'}, {'key': 'val'}, {'key': 'val', 'unset': 'unset'})])
|
||||
def test_wrap_settings(override, old, new):
|
||||
def test_default_settings(override, old, new):
|
||||
fn = lambda _, settings: settings
|
||||
assert wrap_settings(override)(fn)(None, Settings(old)) == new
|
||||
assert default_settings(override)(fn)(None, Settings(old)) == new
|
||||
|
||||
|
||||
def test_memoize():
|
||||
|
Reference in New Issue
Block a user