jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1004635?usp=email )
Change subject: [tests] clear pywikibot._sites instead of reallocate it ......................................................................
[tests] clear pywikibot._sites instead of reallocate it
Bug: T357891 Change-Id: Icf5d3b8a3c2efbe001cf8afc9b1b5c10c314730c --- M tests/aspects.py 1 file changed, 11 insertions(+), 1 deletion(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/aspects.py b/tests/aspects.py index efca054..4c3d1fb 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -945,7 +945,7 @@ def _uncached(cls): if not hasattr(cls, 'cached') or not cls.cached: orig_sites = pywikibot._sites - pywikibot._sites = {} + pywikibot._sites.clear() yield if not hasattr(cls, 'cached') or not cls.cached: pywikibot._sites = orig_sites