From: Zbigniew Jędrzejewski-Szmek Date: Tue, 6 Jun 2023 19:07:58 +0000 (+0200) Subject: test_ukify: cleanups suggested by pylint X-Git-Tag: v254-rc1~207^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff7580e280dc7b817ec38b5aa3c97293ff4b2bb8;p=thirdparty%2Fsystemd.git test_ukify: cleanups suggested by pylint --- diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py index ac39a719402..2027d65ecd3 100755 --- a/src/ukify/test/test_ukify.py +++ b/src/ukify/test/test_ukify.py @@ -4,6 +4,7 @@ # pylint: disable=missing-docstring,redefined-outer-name,invalid-name # pylint: disable=unused-import,import-outside-toplevel,useless-else-on-loop # pylint: disable=consider-using-with,wrong-import-position,unspecified-encoding +# pylint: disable=protected-access import base64 import json @@ -106,7 +107,7 @@ def test_apply_config(tmp_path): assert ns.signing_engine == 'engine1' assert ns.sb_key == 'some/path5' assert ns.sb_cert == 'some/path6' - assert ns.sign_kernel == False + assert ns.sign_kernel is False assert ns._groups == ['NAME'] assert ns.pcr_private_keys == [pathlib.Path('some/path7')] @@ -129,7 +130,7 @@ def test_apply_config(tmp_path): assert ns.signing_engine == 'engine1' assert ns.sb_key == 'some/path5' assert ns.sb_cert == 'some/path6' - assert ns.sign_kernel == False + assert ns.sign_kernel is False assert ns._groups == ['NAME'] assert ns.pcr_private_keys == [pathlib.Path('some/path7')] @@ -447,7 +448,7 @@ def test_sections(kernel_initrd, tmpdir): for sect in 'text osrel cmdline linux initrd uname test'.split(): assert re.search(fr'^\s*\d+\s+.{sect}\s+0', dump, re.MULTILINE) -def test_addon(kernel_initrd, tmpdir): +def test_addon(tmpdir): output = f'{tmpdir}/addon.efi' args = [ 'build', @@ -459,7 +460,7 @@ def test_addon(kernel_initrd, tmpdir): args += [f'--stub={stub}'] expected_exceptions = () else: - expected_exceptions = FileNotFoundError, + expected_exceptions = (FileNotFoundError,) opts = ukify.parse_args(args) try: