diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-06-05 15:47:00 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-06-06 15:41:01 +0200 |
commit | 1df35a4638f9869b823b71ec27bcff1e510ef26c (patch) | |
tree | 6a29988f464026758e813d76604ae1220fac3bef /src/ukify/test/test_ukify.py | |
parent | ukify: make code pylint clean (diff) | |
download | systemd-1df35a4638f9869b823b71ec27bcff1e510ef26c.tar.xz systemd-1df35a4638f9869b823b71ec27bcff1e510ef26c.zip |
ukify: simplify creation of parser
00e5933f57c6e336ebed18601299acc6855bb3c2 made all the positional arguments
optional, so let's take advantage of this to simplify variuos callers.
Diffstat (limited to '')
-rwxr-xr-x | src/ukify/test/test_ukify.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py index 692b7a384b..ab89e11b73 100755 --- a/src/ukify/test/test_ukify.py +++ b/src/ukify/test/test_ukify.py @@ -50,9 +50,9 @@ def test_round_up(): assert ukify.round_up(4097) == 8192 def test_namespace_creation(): - ns = ukify.create_parser().parse_args(('A','B')) - assert ns.linux == pathlib.Path('A') - assert ns.initrd == [pathlib.Path('B')] + ns = ukify.create_parser().parse_args(()) + assert ns.linux is None + assert ns.initrd == [] def test_config_example(): ex = ukify.config_example() @@ -87,7 +87,7 @@ def test_apply_config(tmp_path): Phases = {':'.join(ukify.KNOWN_PHASES)} ''')) - ns = ukify.create_parser().parse_args(('A','B')) + ns = ukify.create_parser().parse_args(()) ns.linux = None ns.initrd = [] ukify.apply_config(ns, config) |