示例#1
0
def test_wrap_settings():
    fn = lambda _, settings: settings
    assert wrap_settings({'key': 'val'})(fn)(None, Settings({})) \
           == {'key': 'val'}
    assert wrap_settings({'key': 'new-val'})(fn)(None,
                                                 Settings({'key': 'val'})) == {
                                                     'key': 'new-val'
                                                 }
示例#2
0
def test_wrap_settings(override, old, new):
    fn = lambda _, settings: settings
    assert wrap_settings(override)(fn)(None, Settings(old)) == new
示例#3
0
文件: test_utils.py 项目: 7oi/thefuck
def test_wrap_settings(override, old, new):
    fn = lambda _, settings: settings
    assert wrap_settings(override)(fn)(None, Settings(old)) == new
示例#4
0
def test_wrap_settings():
    fn = lambda _, settings: settings
    assert wrap_settings({'key': 'val'})(fn)(None, Settings({})) \
           == {'key': 'val'}
    assert wrap_settings({'key': 'new-val'})(fn)(
        None, Settings({'key': 'val'})) == {'key': 'new-val'}