dedicated function to translate numerical test ID to a name

This commit is contained in:
Philip Eisenlohr 2017-04-30 13:15:53 -04:00
parent 515faf2d1b
commit a99ff40242
1 changed files with 5 additions and 1 deletions

View File

@ -74,6 +74,10 @@ class Test():
)
def variantName(self,variant):
"""Generate name of (numerical) variant."""
return str(variant)
def execute(self):
"""Run all variants and report first failure."""
if not self.options.keep:
@ -81,7 +85,7 @@ class Test():
self.clean()
self.prepareAll()
for variant,name in enumerate(self.variants):
for variant,name in enumerate(map(self.variantName,self.variants)):
if self.options.show:
logging.critical('{}: {}'.format(variant+1,name))
elif self.options.select is not None \