mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-19 03:32:31 +01:00
#116 Fix tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
from thefuck.main import Command
|
||||
from thefuck.types import Command
|
||||
from thefuck.rules.composer_not_command import match, get_new_command
|
||||
|
||||
|
||||
@@ -34,15 +34,15 @@ def composer_not_command_one_of_this():
|
||||
|
||||
"""
|
||||
|
||||
|
||||
def test_match(composer_not_command, composer_not_command_one_of_this):
|
||||
assert match(Command('composer udpate', '', composer_not_command), None)
|
||||
assert match(Command('composer pdate', '', composer_not_command_one_of_this), None)
|
||||
assert not match(Command('ls update', '', composer_not_command), None)
|
||||
#assert not match(Command('composer update', '', composer_command), None)
|
||||
|
||||
|
||||
def test_get_new_command(composer_not_command, composer_not_command_one_of_this):
|
||||
assert get_new_command(Command('composer udpate', '', composer_not_command), None)\
|
||||
== 'composer update'
|
||||
assert get_new_command(Command('composer udpate', '', composer_not_command), None) \
|
||||
== 'composer update'
|
||||
assert get_new_command(
|
||||
Command('composer pdate', '', composer_not_command_one_of_this), None) == 'composer selfupdate'
|
||||
|
Reference in New Issue
Block a user