Skip to content

Commit 9210997

Browse files
committed
tests: fix undercounting of suites
With the introduction of data variants for suites, we started undercounting the number of suites as we didn't account for those that were executed twice. This was then adjusted to count the number of initializers instead, but this fails to account for suites without any initializers at all. Fix the suite count by counting either the number of initializers or, if there is no initializer, count it as a single suite, only.
1 parent 29fe79e commit 9210997

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/generate.py

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def disable(self, excluded):
210210
module.modified = True
211211

212212
def suite_count(self):
213-
return sum(len(module.initializers) for module in self.modules.values())
213+
return sum(max(1, len(m.initializers)) for m in self.modules.values())
214214

215215
def callback_count(self):
216216
return sum(len(module.callbacks) for module in self.modules.values())

0 commit comments

Comments
 (0)