jenkins-bot has submitted this change and it was merged.
Change subject: Do not print thread info under unittests
......................................................................
Do not print thread info under unittests
On Python 2.6, this causes errors. Everywhere else it is
confusing to have differences between running tests individually
vs as a batch via setup.py
Change-Id: I7ea207f1f9e994e7542ac93eb4130ea60ad646a0
---
M scripts/archivebot.py
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/archivebot.py b/scripts/archivebot.py
index 018c225..8b073e8 100644
--- a/scripts/archivebot.py
+++ b/scripts/archivebot.py
@@ -277,7 +277,9 @@
self.header += line + '\n'
if cur_thread:
self.threads.append(cur_thread)
- if pywikibot.calledModuleName() != 'archivebot_tests':
+ # This extra info is not desirable when run under the unittest
+ # framework, which may be run either directly or via setup.py
+ if pywikibot.calledModuleName() not in ['archivebot_tests',
'setup']:
pywikibot.output(u'%d Threads found on %s'
% (len(self.threads), self))
--
To view, visit
https://gerrit.wikimedia.org/r/142984
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ea207f1f9e994e7542ac93eb4130ea60ad646a0
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>