test-bots: Make bots_to_test a set, ensuring tests are not duplicated.
The previous style was causing duplicate tests for the dropbox_share bot for the unittest runner, due to globbing of test_*.py giving duplicates. However, it also avoids unintentional duplication of bot names to test on the command line being tested multiple times, though again only with the unittest runner.
This commit is contained in:
parent
2895853938
commit
4e0dccc9f5
|
@ -87,7 +87,9 @@ def main():
|
||||||
else:
|
else:
|
||||||
specified_bots = available_bots
|
specified_bots = available_bots
|
||||||
|
|
||||||
bots_to_test = filter(lambda bot: bot not in options.exclude, specified_bots)
|
# Use of a set ensures we don't end up with duplicate tests with unittest
|
||||||
|
# (from globbing multiple test_*.py files, or multiple on the command line)
|
||||||
|
bots_to_test = {bot for bot in specified_bots if bot not in options.exclude}
|
||||||
|
|
||||||
if options.pytest:
|
if options.pytest:
|
||||||
excluded_bots = ['merels']
|
excluded_bots = ['merels']
|
||||||
|
|
Loading…
Reference in a new issue