[elbe-devel] [PATCH 1/2] test: support ElbeTestCase.params being a callable

Torben Hohn torben.hohn at linutronix.de
Wed Jul 22 17:55:10 CEST 2020


Signed-off-by: Torben Hohn <torben.hohn 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



More information about the elbe-devel mailing list