Steps to replicate the issue:
Modify FamilyTestGenerator in generate_family_file_tests that ii wiki is always used:
def getapis(self):
"""Only load up to additional ten different wikis randomly."""
save = self.langs
self.langs = sample(save, min(len(save), 9))
for k in save:
if k['prefix'] == 'ii':
self.langs.append(k)
self.prefixes = [item['prefix'] for item in self.langs]
super().getapis()
self.langs = saveWhat happens?:
Test always fails:
test_attributes_after_run (__main__.TestGenerateFamilyFiles.test_attributes_after_run) (test='Test element counts')
Test FamilyFileGenerator attributes after run(). ... FAIL
16.152s
======================================================================
FAIL: test_attributes_after_run (__main__.TestGenerateFamilyFiles.test_attributes_after_run) (test='Test element counts')
Test FamilyFileGenerator attributes after run().
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\pwb\GIT\core\tests\generate_family_file_tests.py", line 82, in test_attributes_after_run
self.assertCountEqual(gen.prefixes, gen.wikis)
AssertionError: Element counts were not equal:
First has 1, Second has 0: 'ii'
----------------------------------------------------------------------
Ran 1 test in 17.073s
FAILED (failures=1)https://integration.wikimedia.org/ci/job/pywikibot-core-tox-deeptest-py36-docker/2353/console
Other information
The same problem occurs with kr-wiki: str object has no description