jenkins-bot submitted this change.
[tests] clear pywikibot._sites instead of reallocate it
Bug: T357891
Change-Id: Icf5d3b8a3c2efbe001cf8afc9b1b5c10c314730c
---
M tests/aspects.py
1 file changed, 11 insertions(+), 1 deletion(-)
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 change 1004635. To unsubscribe, or for help writing mail filters, visit settings.