Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Feb 16, 2025
1 parent ce228a1 commit 5a99009
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,6 @@ def assert_almost_eq(value: float, expected: float):
assert abs(value - expected) < 1


@pytest.mark.parametrize(
("size", "expected"),
{
512: (512, "B"),
1024: (1.0, "KiB"),
1048575: (1023.999, "KiB"),
1048576: (1.0, "MiB"),
1073741824: (1.0, "GiB"),
1099511627776: (1.0, "TiB"),
1125899906842624: (1.0, "PiB"),
1152921504606846976: (1.0, "EiB"),
}.items(),
)
def test_format_size(size, expected: tuple[float, str]):
result = utils.format_size(size)
assert_almost_eq(result[0], expected[0])
assert result[1] == expected[1]


@pytest.mark.parametrize(
("delta", "expected"),
{
Expand Down

0 comments on commit 5a99009

Please sign in to comment.