runner: combine a sort+reverse to a sort(reverse=True)
Suggested by Zac-HD.
This commit is contained in:
parent
1b23a111d2
commit
09e38b1697
|
@ -77,8 +77,7 @@ def pytest_terminal_summary(terminalreporter: "TerminalReporter") -> None:
|
||||||
dlist.append(rep)
|
dlist.append(rep)
|
||||||
if not dlist:
|
if not dlist:
|
||||||
return
|
return
|
||||||
dlist.sort(key=lambda x: x.duration) # type: ignore[no-any-return]
|
dlist.sort(key=lambda x: x.duration, reverse=True) # type: ignore[no-any-return]
|
||||||
dlist.reverse()
|
|
||||||
if not durations:
|
if not durations:
|
||||||
tr.write_sep("=", "slowest durations")
|
tr.write_sep("=", "slowest durations")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue