mirror of
https://github.com/nvbn/thefuck.git
synced 2025-04-14 23:00:45 +01:00
Fix: Updated disabling memoize.
This commit is contained in:
parent
bdcf0132bf
commit
8b6a59379b
@ -5,9 +5,6 @@ from thefuck.rules.docker_not_command import get_new_command, match
|
||||
from thefuck.utils import memoize
|
||||
|
||||
|
||||
# Temporarily disabling memoize because thefuck.rules.get_docker_commands should be run as both old and new versions.
|
||||
memoize.disabled = True
|
||||
|
||||
_DOCKER_SWARM_OUTPUT = '''
|
||||
Usage: docker swarm COMMAND
|
||||
|
||||
@ -48,6 +45,14 @@ Run 'docker image COMMAND --help' for more information on a command.
|
||||
'''
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def disable_memoize():
|
||||
# Temporarily disabling memoize because thefuck.rules.get_docker_commands should be run as both old and new versions
|
||||
memoize.disabled = True
|
||||
yield
|
||||
memoize.disabled = False
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def docker_help(mocker):
|
||||
help = b'''Usage: docker [OPTIONS] COMMAND [arg...]
|
||||
@ -293,6 +298,3 @@ def test_get_new_management_command(wrong, fixed):
|
||||
def test_get_new_management_command_subcommand(wrong, fixed, output):
|
||||
command = Command('docker {}'.format(wrong), output)
|
||||
assert get_new_command(command) == ['docker {}'.format(x) for x in fixed]
|
||||
|
||||
|
||||
memoize.disabled = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user