Format the given seconds in a human readable manner to show in the final summary.
(seconds: float)
| 1365 | |
| 1366 | |
| 1367 | def format_session_duration(seconds: float) -> str: |
| 1368 | """Format the given seconds in a human readable manner to show in the final summary.""" |
| 1369 | if seconds < 60: |
| 1370 | return f"{seconds:.2f}s" |
| 1371 | else: |
| 1372 | dt = datetime.timedelta(seconds=int(seconds)) |
| 1373 | return f"{seconds:.2f}s ({dt})" |
| 1374 | |
| 1375 | |
| 1376 | def _get_raw_skip_reason(report: TestReport) -> str: |