jenkins-bot has submitted this change and it was merged.
Change subject: Allow shell.py to emit its prompt multiple times ......................................................................
Allow shell.py to emit its prompt multiple times
1d0f94c allowed shell.py to emit a single '>>> ' on stdout. Sometimes it emits '>>> >>> ', so allow that too. https://travis-ci.org/wikimedia/pywikibot-core/jobs/43425062
Change-Id: I746187d58e254d2d83b41b24874479bb954475b4 --- M tests/script_tests.py 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/script_tests.py b/tests/script_tests.py index 06f3df7..8acb41e 100644 --- a/tests/script_tests.py +++ b/tests/script_tests.py @@ -335,8 +335,10 @@ # Specifically look for deprecated self.assertNotIn('deprecated', result['stdout'].lower()) # But also complain if there is any stdout - # but ignore shell.py emiting a prompt - if result['stdout'] in ['', '>>> ']: + # but ignore shell.py emiting its '>>> ' prompt. + if ((script_name == 'shell' and + set(result['stdout']) == set('> \n')) + or result['stdout'] == ''): result['stdout'] = None self.assertIsNone(result['stdout'])