[elbe-devel] [PATCH 1/2] test: support ElbeTestCase.params being a callable
Olivier Dion
dion at linutronix.de
Wed Jul 22 18:02:59 CEST 2020
On Wed, 22 Jul 2020, Torben Hohn <torben.hohn at linutronix.de> wrote:
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
Reviewed-by: Olivier Dion <dion at linutronix.de>
> ---
> elbepack/commands/test.py | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/elbepack/commands/test.py b/elbepack/commands/test.py
> index 161008576..c8cfccae5 100644
> --- a/elbepack/commands/test.py
> +++ b/elbepack/commands/test.py
> @@ -57,7 +57,12 @@ class ElbeTestSuite(object):
> self.tests.append(test)
> continue
>
> - for param in test.params:
> + if callable(test.params):
> + params = test.params()
> + else:
> + params = test.params
> +
> + for param in params:
> self.tests.append(test.parameterize(param))
>
> def __iter__(self):
> --
> 2.20.1
>
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel
--
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
More information about the elbe-devel
mailing list