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

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1004635?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Icf5d3b8a3c2efbe001cf8afc9b1b5c10c314730c
Gerrit-Change-Number: 1004635
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to