[Buildroot] [PATCH 4/5] support/testing: fix python syntax

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sun Jun 10 13:57:27 UTC 2018


Hello,

On Sun,  3 Jun 2018 11:08:21 +0200, Yann E. MORIN wrote:
> Fix three issues with code style in our test infra:
>   - 'print' is now a function,
>   - exceptions need to be caught-assigned with the 'as' keyword,
>   - old-style "%s"%() formatting is deprecated.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> Cc: Ricardo Martincoski <ricardo.martincoski at gmail.com>
> 
> ---
> Changes v1 -> v2:
>   - this was previously caught because of a spurious switch to
>     python3-flake8, as noticed by Ricardo. We're now back to using
>     python-flake8, so the rationale has changed. Still, we do want
>     to fix those because it makes sense anyway.
> ---
>  support/testing/infra/__init__.py |  6 +++---
>  support/testing/infra/basetest.py |  4 ++--
>  support/testing/run-tests         | 26 +++++++++++++-------------
>  3 files changed, 18 insertions(+), 18 deletions(-)

I've dropped the changes that added indices to format strings (since
they would only be needed for Python 2.6 compatibility, and I'm not
sure that it's a worthwhile goal to be able to run the test suite on
Python 2.6 machines). And then I've applied to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list