[PATCH 1/1] test: avoid function name 'setup'

Simon Glass sjg at chromium.org
Sun Jul 16 01:40:45 CEST 2023


Hi Heinrich,

On Sat, 15 Jul 2023 at 03:05, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> pytest 7.3.2 treats the function name 'setup' as a fixture [1].
>
> This leads to errors like:
>
>     TypeError: setup() missing 2 required positional arguments:
>     'disk_img' and 'osindications'
>
> Rename setup() to capsule_setup().
>
> [1] How to run tests written for nose
>     https://docs.pytest.org/en/7.3.x/how-to/nose.html
>
> Fixes: 482ef90aeb4c ("test: efi_capsule: refactor efi_capsule test")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  test/py/tests/test_efi_capsule/capsule_common.py     |  2 +-
>  .../test_efi_capsule/test_capsule_firmware_fit.py    | 10 +++++-----
>  .../test_efi_capsule/test_capsule_firmware_raw.py    | 12 ++++++------
>  .../test_capsule_firmware_signed_fit.py              | 12 ++++++------
>  .../test_capsule_firmware_signed_raw.py              | 12 ++++++------
>  5 files changed, 24 insertions(+), 24 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Would it make sense to reduce the code duplication a little?

Regards,
SImon


More information about the U-Boot mailing list