Skip to content

Commit 8b727c3

Browse files
committed
Revert "test: Sort completion results items"
This reverts commit 8074741.
1 parent 14c8dce commit 8b727c3

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

test/t/conftest.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,9 +776,7 @@ def startswith(self, prefix: str) -> bool:
776776
return self.output.startswith(prefix)
777777

778778
def _items(self) -> List[str]:
779-
return sorted(
780-
[x.strip() for x in self.output.strip().splitlines() if x]
781-
)
779+
return [x.strip() for x in self.output.strip().splitlines() if x]
782780

783781
def __eq__(self, expected: object) -> bool:
784782
"""
@@ -793,7 +791,7 @@ def __eq__(self, expected: object) -> bool:
793791
return False
794792
else:
795793
expiter = expected
796-
return self._items() == sorted(expiter)
794+
return self._items() == expiter
797795

798796
def __contains__(self, item: str) -> bool:
799797
return item in self._items()

test/t/unit/test_unit_dequote.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import re
2-
31
import pytest
42

53
from conftest import assert_bash_exec, bash_env_saved
@@ -40,8 +38,7 @@ def test_5_brace(self, bash, functions):
4038

4139
def test_6_glob(self, bash, functions):
4240
output = assert_bash_exec(bash, "__tester 'a?b'", want_output=True)
43-
items = sorted(re.findall(r"<[^>]*>", output))
44-
assert "".join(items) == "<a b><a$b><a&b><a'b>"
41+
assert output.strip() == "<a b><a$b><a&b><a'b>"
4542

4643
def test_7_quote_1(self, bash, functions):
4744
output = assert_bash_exec(

0 commit comments

Comments
 (0)