Cast numeric string in readable_to_bytes

This commit is contained in:
KnugiHK
2025-06-01 12:15:15 +08:00
parent 706466f63b
commit 0ecfe6c59a
3 changed files with 10 additions and 12 deletions

View File

@@ -76,8 +76,7 @@ class TestReadableToBytes:
readable_to_bytes("ABC KB")
def test_missing_unit(self):
with pytest.raises(ValueError, match="Invalid input for size_str"):
readable_to_bytes("100")
assert readable_to_bytes("100") == 100
class TestSanitizeExcept: