From: Yu Watanabe Date: Sat, 29 Jul 2023 10:20:39 +0000 (+0900) Subject: test-ukify: add tests for an empty argument X-Git-Tag: v255-rc1~897^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F28562%2Fhead;p=thirdparty%2Fsystemd.git test-ukify: add tests for an empty argument --- diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py index 3cc3492fe01..9a07f3397c4 100755 --- a/src/ukify/test/test_ukify.py +++ b/src/ukify/test/test_ukify.py @@ -144,6 +144,11 @@ def test_apply_config(tmp_path): assert ns.phase_path_groups == [['enter-initrd:leave-initrd:sysinit:ready:shutdown:final']] def test_parse_args_minimal(): + try: + ukify.parse_args([]) + except ValueError as e: + print(f'expected failure: {e}') + opts = ukify.parse_args('arg1 arg2'.split()) assert opts.linux == pathlib.Path('arg1') assert opts.initrd == [pathlib.Path('arg2')]