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)
|
||||
if not dlist:
|
||||
return
|
||||
dlist.sort(key=lambda x: x.duration) # type: ignore[no-any-return]
|
||||
dlist.reverse()
|
||||
dlist.sort(key=lambda x: x.duration, reverse=True) # type: ignore[no-any-return]
|
||||
if not durations:
|
||||
tr.write_sep("=", "slowest durations")
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue