Sort sessions in SessionMnager.list_sessions()
This commit is contained in:
parent
b7a296c81f
commit
a20f017c7a
@ -426,7 +426,7 @@ class SessionManager(QObject):
|
||||
base, ext = os.path.splitext(filename)
|
||||
if ext == '.yml':
|
||||
sessions.append(base)
|
||||
return sessions
|
||||
return sorted(sessions)
|
||||
|
||||
@cmdutils.register(instance='session-manager')
|
||||
@cmdutils.argument('name', completion=miscmodels.session)
|
||||
|
@ -372,7 +372,7 @@ class TestListSessions:
|
||||
(tmpdir / 'foo.yml').ensure()
|
||||
(tmpdir / 'bar.yml').ensure()
|
||||
sess_man = sessions.SessionManager(str(tmpdir))
|
||||
assert sorted(sess_man.list_sessions()) == ['bar', 'foo']
|
||||
assert sess_man.list_sessions() == ['bar', 'foo']
|
||||
|
||||
def test_with_other_files(self, tmpdir):
|
||||
(tmpdir / 'foo.yml').ensure()
|
||||
|
Loading…
Reference in New Issue
Block a user