jenkins-bot has submitted this change and it was merged.
Change subject: Allow sleeps to occur during scripts
......................................................................
Allow sleeps to occur during scripts
Most of the scripts which performed a login too
early have been fixed in:
I63e1699a4b70dde161c0430beaaa5ed0b44093cb
However other scripts auto-run, and still may unexpectedly report sleeps
on stderr. Separate them from other stderr output,
Change-Id: I0c10a96e55dadfe84d824253f82a7593afb4cfd4
---
M tests/script_tests.py
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
Ladsgroup: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/script_tests.py b/tests/script_tests.py
index abfdcc4..f65404f 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -178,7 +178,12 @@
result['stderr'])
elif (args and '-help' in args) or \
script_name not in auto_run_script_list:
- self.assertEqual(result['stderr'], '')
+ stderr = [l for l in result['stderr'].split('\n')
+ if not l.startswith('Sleeping for ')]
+ pywikibot.output('\n'.join(
+ [l for l in result['stderr'].split('\n')
+ if l.startswith('Sleeping for ')]))
+ self.assertEqual('\n'.join(stderr), '')
self.assertIn('Global arguments available for all',
result['stdout'])
self.assertEqual(result['exit_code'], 0)
--
To view, visit
https://gerrit.wikimedia.org/r/153004
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0c10a96e55dadfe84d824253f82a7593afb4cfd4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>