def _process_step(self, step):
"""Steps can be plain strings or tuples when matching images"""
if isinstance(step, VersionPick):
# Version pick passed, coerce it ...
step = step.pick(self.browser.product_version)
if isinstance(step, tuple):
image = step[0]
step = step[1]
if isinstance(step, VersionPick):
# Version pick passed, coerce it ...
step = step.pick(self.browser.product_version)
else:
image = None
if not isinstance(step, six.string_types + (re._pattern_type,)):
step = str(step)
return image, step
评论列表
文章目录