tests.test_humanize moduleΒΆ
Tests for the human-readable renderings of machine quantities.
- tests.test_humanize.test_format_file_size(size_bytes, expected)[source]ΒΆ
Human-readable file size formatting.
- Return type:
- tests.test_humanize.test_format_age(days_ago, expected)[source]ΒΆ
An mtime renders as whole days, singular for one.
- Return type:
- tests.test_humanize.test_utc_midnight_starts_the_day()[source]ΒΆ
A date carries no time of day, so it enters a countdown at midnight.
- Return type:
- tests.test_humanize.test_shift_months_clamps_the_day(instant, months, expected)[source]ΒΆ
A month shift lands on the last day of a shorter target month.
- Return type:
- tests.test_humanize.test_format_relative_buckets(offset, ahead, behind)[source]ΒΆ
Each gap falls in one bucket, phrased ahead of or behind the reference.
- Return type:
- tests.test_humanize.test_format_countdown(deadline, reference, expected)[source]ΒΆ
A countdown follows the precision of the instants it is given.
- Return type:
- tests.test_humanize.test_format_elapsed(instant, reference, expected)[source]ΒΆ
The past-facing mirror drops its phrase in the other direction.
- Return type: