@@ -1,3 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import pytest
|
||||
from pathlib import PosixPath
|
||||
from thefuck import corrector, conf
|
||||
@@ -53,7 +55,9 @@ def test_organize_commands():
|
||||
"""Ensures that the function removes duplicates and sorts commands."""
|
||||
commands = [CorrectedCommand('ls'), CorrectedCommand('ls -la', priority=9000),
|
||||
CorrectedCommand('ls -lh', priority=100),
|
||||
CorrectedCommand(u'echo café', priority=200),
|
||||
CorrectedCommand('ls -lh', priority=9999)]
|
||||
assert list(organize_commands(iter(commands))) \
|
||||
== [CorrectedCommand('ls'), CorrectedCommand('ls -lh', priority=100),
|
||||
CorrectedCommand(u'echo café', priority=200),
|
||||
CorrectedCommand('ls -la', priority=9000)]
|
||||
|
||||
Reference in New Issue
Block a user