forked from Mirror/pmbootstrap
pmb.helpers.other.folder_size: use kilobytes (MR 2074)
busybox du doesn't support bytes or custom block sizes.
This commit is contained in:
parent
5c1da79634
commit
31e7a0006d
4 changed files with 6 additions and 7 deletions
|
@ -31,7 +31,7 @@ def test_get_folder_size(args, tmpdir):
|
|||
# Check if the size is correct. Unfortunately, the `du` call
|
||||
# in pmb.helpers.other.folder_size is not very accurate, so we
|
||||
# allow 30kb of tolerance (good enough for our use case): #760 #1717
|
||||
tolerance = 30 * 1024
|
||||
size = 204800 * files
|
||||
tolerance = 30
|
||||
size = 200 * files
|
||||
result = pmb.helpers.other.folder_size(args, tmpdir)
|
||||
assert (result < size + tolerance and result > size - tolerance)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue