summaryrefslogtreecommitdiffstats
path: root/src/ukify/test/test_ukify.py
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-06-05 15:47:00 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-06-06 15:41:01 +0200
commit1df35a4638f9869b823b71ec27bcff1e510ef26c (patch)
tree6a29988f464026758e813d76604ae1220fac3bef /src/ukify/test/test_ukify.py
parentukify: make code pylint clean (diff)
downloadsystemd-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-xsrc/ukify/test/test_ukify.py8
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)