mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-19 03:32:31 +01:00
Add ability to change settings via environment variables
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
from mock import Mock
|
||||
from thefuck.utils import sudo_support
|
||||
from thefuck.utils import sudo_support, wrap_settings
|
||||
from thefuck.main import Command
|
||||
from thefuck.conf import BaseSettings
|
||||
|
||||
|
||||
def test_wrap_settings():
|
||||
fn = lambda _, settings: settings._conf
|
||||
assert wrap_settings({'key': 'val'})(fn)(None, BaseSettings({})) \
|
||||
== {'key': 'val'}
|
||||
assert wrap_settings({'key': 'new-val'})(fn)(
|
||||
None, BaseSettings({'key': 'val'})) == {'key': 'new-val'}
|
||||
|
||||
|
||||
def test_sudo_support():
|
||||
|
Reference in New Issue
Block a user