1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-30 22:54:14 +00:00

Improve brew* rules import time

This commit is contained in:
mcarton
2015-08-26 19:46:23 +02:00
parent 2b750bac8b
commit b0702d309f
5 changed files with 56 additions and 59 deletions

View File

@@ -1,6 +1,6 @@
import pytest
from thefuck.rules.brew_install import match, get_new_command
from thefuck.rules.brew_install import brew_formulas
from thefuck.rules.brew_install import _get_formulas
from tests.utils import Command
@@ -20,9 +20,7 @@ def brew_already_installed():
def _is_not_okay_to_test():
if 'elasticsearch' not in brew_formulas:
return True
return False
return 'elasticsearch' not in _get_formulas()
@pytest.mark.skipif(_is_not_okay_to_test(),

View File

@@ -1,6 +1,6 @@
import pytest
from thefuck.rules.brew_unknown_command import match, get_new_command
from thefuck.rules.brew_unknown_command import brew_commands
from thefuck.rules.brew_unknown_command import _brew_commands
from tests.utils import Command
@@ -16,7 +16,7 @@ def brew_unknown_cmd2():
def test_match(brew_unknown_cmd):
assert match(Command('brew inst', stderr=brew_unknown_cmd), None)
for command in brew_commands:
for command in _brew_commands():
assert not match(Command('brew ' + command), None)