Rather than fail badly, they should fail in the class constructor or the test framework might be able to simply set a dummy username as these tests do not write so it shouldnt attempt to log in.
======================================================================
ERROR: test_check_if_cached_enws (tests.proofreadpage_tests.TestIndexPageMappings)
Test if cache is checked and loaded properly on wikisource:en
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/aspects.py", line 688, in wrapped_method
func(self, key)
File "tests/proofreadpage_tests.py", line 456, in test_check_if_cached
fetched_label = index_page.get_label_from_page_number(num)
File "pywikibot/proofreadpage.py", line 471, in wrapper
self._get_page_mappings()
File "pywikibot/proofreadpage.py", line 514, in _get_page_mappings
self.purge()
File "pywikibot/page.py", line 1299, in purge
return self.site.purgepages([self], **kwargs)
File "pywikibot/site.py", line 1299, in callee
self.login(False)
File "pywikibot/site.py", line 2058, in login
user=self._username[sysop])
File "pywikibot/tools/__init__.py", line 1357, in wrapper
return obj(*__args, **__kw)
File "pywikibot/login.py", line 115, in __init__
'wiki_code': self.site.code})
NoUsername: ERROR: Username for wikisource:en is undefined.
If you have an account for that site, please add a line to user-config.py:
usernames['wikisource']['en'] = 'myUsername'