Introduction
random.sample() return a k length list of unique elements chosen from the population sequence or set. Used for random sampling without replacement.
https://docs.python.org/3/library/random.html?highlight=choices#random.sample
What to do
site_tests uses shuffle over a given list and copies a sublist:
great_wikis = self.site.family.languages_by_size[:-size] random.shuffle(great_wikis) great_wikis = great_wikis[:size]
This can be simplified with random.sample().
These issues can be found at https://codesearch.wmcloud.org/pywikibot/?q=shuffle&i=nope&files=&excludeFiles=&repos=