mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Leverage sort for sorting items. (#5378)
This commit is contained in:
parent
c3a12b2a9c
commit
d835a8a1e8
1 changed files with 1 additions and 8 deletions
|
@ -34,14 +34,7 @@ def pytest_collection_modifyitems(items):
|
|||
"""Move xsh test first to work around a bug in normal
|
||||
pytest cleanup. The order of tests are otherwise preserved.
|
||||
"""
|
||||
xsh_items = []
|
||||
other_items = []
|
||||
for item in items:
|
||||
if isinstance(item, XshFunction):
|
||||
xsh_items.append(item)
|
||||
else:
|
||||
other_items.append(item)
|
||||
items[:] = xsh_items + other_items
|
||||
items.sort(key=lambda item: -isinstance(item, XshFunction))
|
||||
|
||||
|
||||
def _limited_traceback(excinfo):
|
||||
|
|
Loading…
Add table
Reference in a new issue