test-bots: Extract common filter out of conditional.

This commit is contained in:
neiljp (Neil Pilgrim) 2018-05-26 16:39:22 -07:00
parent 210caa4a60
commit bda678344f

View file

@ -70,11 +70,11 @@ def main():
cov.start()
if options.bots_to_test:
bots_to_test = filter(lambda bot: bot not in options.exclude,
options.bots_to_test)
specified_bots = options.bots_to_test
else:
bots_to_test = filter(lambda bot: bot not in options.exclude,
available_bots)
specified_bots = available_bots
bots_to_test = filter(lambda bot: bot not in options.exclude, specified_bots)
# Should add a check here that __init__.py is absent if test_*.py is present?