[PATCH 1/1] test: avoid function name 'setup'
Ilias Apalodimas
ilias.apalodimas at linaro.org
Mon Jul 24 15:58:20 CEST 2023
On Sun, 16 Jul 2023 at 16:37, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
>
>
> On 7/16/23 01:40, Simon Glass wrote:
> > 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?
>
> Thank you for reviewing.
>
> Fixed 482ef90aeb4c ("test: efi_capsule: refactor efi_capsule test")
> started the de-duplication effort.
>
> Best regards
>
> Heinrich
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list