diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-04-13 18:13:32 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-04-21 08:50:35 +0200 |
commit | b54477ff8b4f5de286e6ee0d5fd656a4a6eef295 (patch) | |
tree | a0c6f0f071d4702fa691d3d0f0fdb86e16a60ccf /test/py/tests/test_efi_capsule/conftest.py | |
parent | 4bccbd32fb21b838fb8a90f935ecf4bdf83e115e (diff) |
test: fix pylint warning for capsule tests
Fix pylint warnings like:
* Class inherits from object
* Missing module description
* Missing class description
* First line of comment blank
* Superfluous imports
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'test/py/tests/test_efi_capsule/conftest.py')
-rw-r--r-- | test/py/tests/test_efi_capsule/conftest.py | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py index 4879f2b5c2..0e5137de60 100644 --- a/test/py/tests/test_efi_capsule/conftest.py +++ b/test/py/tests/test_efi_capsule/conftest.py @@ -2,30 +2,21 @@ # Copyright (c) 2020, Linaro Limited # Author: AKASHI Takahiro <takahiro.akashi@linaro.org> -import os -import os.path -import re -from subprocess import call, check_call, check_output, CalledProcessError -import pytest -from capsule_defs import * +"""Fixture for UEFI capsule test +""" -# -# Fixture for UEFI capsule test -# +from subprocess import call, check_call, CalledProcessError +import pytest +from capsule_defs import CAPSULE_DATA_DIR, CAPSULE_INSTALL_DIR, EFITOOLS_PATH @pytest.fixture(scope='session') def efi_capsule_data(request, u_boot_config): - """Set up a file system to be used in UEFI capsule and - authentication test. - - Args: - request: Pytest request object. - u_boot_config: U-boot configuration. + """Set up a file system to be used in UEFI capsule and authentication test + and return a ath to disk image to be used for testing - Return: - A path to disk image to be used for testing + request -- Pytest request object. + u_boot_config -- U-boot configuration. """ - global CAPSULE_DATA_DIR, CAPSULE_INSTALL_DIR mnt_point = u_boot_config.persistent_data_dir + '/test_efi_capsule' data_dir = mnt_point + CAPSULE_DATA_DIR |