|
10 | 10 | from ralphify.contexts import Context, ContextResult |
11 | 11 | from ralphify.cli import app, CONFIG_FILENAME |
12 | 12 | from ralphify._templates import RALPH_TOML_TEMPLATE, PROMPT_TEMPLATE |
13 | | -from ralphify.engine import _format_duration |
| 13 | +from ralphify.engine import format_duration |
14 | 14 |
|
15 | 15 | runner = CliRunner() |
16 | 16 |
|
@@ -531,18 +531,18 @@ def test_timeout_shows_in_header(self, mock_run, tmp_path, monkeypatch): |
531 | 531 |
|
532 | 532 | class TestFormatDuration: |
533 | 533 | def test_seconds(self): |
534 | | - assert _format_duration(5.3) == "5.3s" |
535 | | - assert _format_duration(0.1) == "0.1s" |
536 | | - assert _format_duration(59.9) == "59.9s" |
| 534 | + assert format_duration(5.3) == "5.3s" |
| 535 | + assert format_duration(0.1) == "0.1s" |
| 536 | + assert format_duration(59.9) == "59.9s" |
537 | 537 |
|
538 | 538 | def test_minutes(self): |
539 | | - assert _format_duration(60) == "1m 0s" |
540 | | - assert _format_duration(90.5) == "1m 30s" |
541 | | - assert _format_duration(3599) == "59m 59s" |
| 539 | + assert format_duration(60) == "1m 0s" |
| 540 | + assert format_duration(90.5) == "1m 30s" |
| 541 | + assert format_duration(3599) == "59m 59s" |
542 | 542 |
|
543 | 543 | def test_hours(self): |
544 | | - assert _format_duration(3600) == "1h 0m" |
545 | | - assert _format_duration(5400) == "1h 30m" |
| 544 | + assert format_duration(3600) == "1h 0m" |
| 545 | + assert format_duration(5400) == "1h 30m" |
546 | 546 |
|
547 | 547 |
|
548 | 548 | def _setup_check(tmp_path, name="ruff-lint", command="ruff check .", enabled=True, |
|
0 commit comments