Commit e86d75f3b2ce6d359520d035b8b21c70545c8cf0

Patrick Steinhardt 2019-07-18T19:00:42

Merge pull request #5175 from pks-t/pks/clar-fix-suite-count clar: fix suite count

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/tests/generate.py b/tests/generate.py
old mode 100755
new mode 100644
index 82e4365..9ed6ede
--- a/tests/generate.py
+++ b/tests/generate.py
@@ -210,7 +210,7 @@ class TestSuite(object):
                     module.modified = True
 
     def suite_count(self):
-        return sum(len(module.initializers) for module in self.modules.values())
+        return sum(max(1, len(m.initializers)) for m in self.modules.values())
 
     def callback_count(self):
         return sum(len(module.callbacks) for module in self.modules.values())