aboutsummaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-05-03 07:08:05 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-05-04 09:57:43 +0200
commitbd730aa05baf1a6c5e61dc1f2e38b48f48a06b05 (patch)
tree1c069da625c8dd09f997ec082d76e74019477651 /test/py
parentd1474f5aa0a9c9ed0e06b3a16d0936160ab2f13c (diff)
test: fix pydoc issues for EFI tests
Fix issues reported by pydocstyle. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'test/py')
-rw-r--r--test/py/tests/test_efi_bootmgr/conftest.py6
-rw-r--r--test/py/tests/test_efi_capsule/capsule_defs.py2
-rw-r--r--test/py/tests/test_efi_capsule/conftest.py11
-rw-r--r--test/py/tests/test_efi_secboot/conftest.py6
-rw-r--r--test/py/tests/test_efi_secboot/defs.py2
5 files changed, 16 insertions, 11 deletions
diff --git a/test/py/tests/test_efi_bootmgr/conftest.py b/test/py/tests/test_efi_bootmgr/conftest.py
index a0a754afbe1b..eabafa542987 100644
--- a/test/py/tests/test_efi_bootmgr/conftest.py
+++ b/test/py/tests/test_efi_bootmgr/conftest.py
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-2.0+
-"""Fixture for UEFI bootmanager test
-"""
+"""Fixture for UEFI bootmanager test."""
import os
import shutil
@@ -10,8 +9,7 @@ import pytest
@pytest.fixture(scope='session')
def efi_bootmgr_data(u_boot_config):
- """Set up a file system to be used in UEFI bootmanager
- tests
+ """Set up a file system to be used in UEFI bootmanager tests.
Args:
u_boot_config -- U-boot configuration.
diff --git a/test/py/tests/test_efi_capsule/capsule_defs.py b/test/py/tests/test_efi_capsule/capsule_defs.py
index 59b40f11bd1d..3cc695e29b56 100644
--- a/test/py/tests/test_efi_capsule/capsule_defs.py
+++ b/test/py/tests/test_efi_capsule/capsule_defs.py
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
+"""Directoreis used for authentication and capsule tests."""
+
# Directories
CAPSULE_DATA_DIR = '/EFI/CapsuleTestData'
CAPSULE_INSTALL_DIR = '/EFI/UpdateCapsule'
diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py
index 0e5137de60d2..a337e6293625 100644
--- a/test/py/tests/test_efi_capsule/conftest.py
+++ b/test/py/tests/test_efi_capsule/conftest.py
@@ -2,8 +2,7 @@
# Copyright (c) 2020, Linaro Limited
# Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
-"""Fixture for UEFI capsule test
-"""
+"""Fixture for UEFI capsule test."""
from subprocess import call, check_call, CalledProcessError
import pytest
@@ -11,13 +10,15 @@ 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
- and return a ath to disk image to be used for testing
+ """Set up a file system and return path to image.
+
+ The function sets up a file system to be used in UEFI capsule and
+ authentication test and returns a path to disk image to be used
+ for testing.
request -- Pytest request object.
u_boot_config -- U-boot configuration.
"""
-
mnt_point = u_boot_config.persistent_data_dir + '/test_efi_capsule'
data_dir = mnt_point + CAPSULE_DATA_DIR
install_dir = mnt_point + CAPSULE_INSTALL_DIR
diff --git a/test/py/tests/test_efi_secboot/conftest.py b/test/py/tests/test_efi_secboot/conftest.py
index 65cde7a2f238..30ff70294380 100644
--- a/test/py/tests/test_efi_secboot/conftest.py
+++ b/test/py/tests/test_efi_secboot/conftest.py
@@ -2,7 +2,7 @@
# Copyright (c) 2019, Linaro Limited
# Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
-""" Fixture for UEFI secure boot test """
+"""Fixture for UEFI secure boot test."""
from subprocess import call, check_call, CalledProcessError
import pytest
@@ -132,7 +132,9 @@ def efi_boot_env(request, u_boot_config):
@pytest.fixture(scope='session')
def efi_boot_env_intca(request, u_boot_config):
- """Set up a file system to be used in UEFI secure boot test
+ """Set up file system for secure boot test.
+
+ Set up a file system to be used in UEFI secure boot test
of intermediate certificates.
Args:
diff --git a/test/py/tests/test_efi_secboot/defs.py b/test/py/tests/test_efi_secboot/defs.py
index b7a2a1185118..6a2317e295b5 100644
--- a/test/py/tests/test_efi_secboot/defs.py
+++ b/test/py/tests/test_efi_secboot/defs.py
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
+"""Constants used for secure boot test."""
+
# Owner guid
GUID = '11111111-2222-3333-4444-123456789abc'