mirror of https://github.com/borgbackup/borg.git
Compare commits
2 Commits
4d2eb0cb1b
...
411c763fb8
Author | SHA1 | Date |
---|---|---|
TW | 411c763fb8 | |
Thomas Waldmann | 54a85bf56d |
|
@ -100,7 +100,7 @@ def format_timedelta(td):
|
|||
s = ts % 60
|
||||
m = int(ts / 60) % 60
|
||||
h = int(ts / 3600) % 24
|
||||
txt = "%.2f seconds" % s
|
||||
txt = "%.3f seconds" % s
|
||||
if m:
|
||||
txt = "%d minutes %s" % (m, txt)
|
||||
if h:
|
||||
|
|
|
@ -61,8 +61,8 @@ def test_stats_format(stats):
|
|||
Number of files: 1
|
||||
Original size: 20 B
|
||||
Deduplicated size: 20 B
|
||||
Time spent in hashing: 0.00 seconds
|
||||
Time spent in chunking: 0.00 seconds
|
||||
Time spent in hashing: 0.000 seconds
|
||||
Time spent in chunking: 0.000 seconds
|
||||
Added files: 0
|
||||
Unchanged files: 0
|
||||
Modified files: 0
|
||||
|
|
|
@ -368,7 +368,7 @@ def test_text_invalid(text):
|
|||
def test_format_timedelta():
|
||||
t0 = datetime(2001, 1, 1, 10, 20, 3, 0)
|
||||
t1 = datetime(2001, 1, 1, 12, 20, 4, 100000)
|
||||
assert format_timedelta(t1 - t0) == "2 hours 1.10 seconds"
|
||||
assert format_timedelta(t1 - t0) == "2 hours 1.100 seconds"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
Loading…
Reference in New Issue