From d65bf32ccbb2b81ebe9f7de5b7a9bf8d1e9d3c5a Mon Sep 17 00:00:00 2001 From: helly25 Date: Fri, 6 Sep 2024 19:09:33 +0000 Subject: [PATCH] Even if the unit is `0` it is not allowed. --- mbo/app/flags_test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mbo/app/flags_test.py b/mbo/app/flags_test.py index a600972..172d92c 100644 --- a/mbo/app/flags_test.py +++ b/mbo/app/flags_test.py @@ -732,6 +732,16 @@ def test_ActionDateTimeOrTimeDelta(self, test: FlagTestData): ), input=["B"], ), + FlagTestData( + test="Unit only is invalid.", + expected="argument flag: value cannot be empty.", + expected_error=argparse.ArgumentError, + action=ActionArgs( + action=mbo.app.flags.ActionByteSize, + unit="0", + ), + input=["0"], + ), FlagTestData( test="Parse zero bytes.", expected=[0, 0, 0, 0, 0],