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'])
 

-- 
To view, visit https://gerrit.wikimedia.org/r/178460
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I746187d58e254d2d83b41b24874479bb954475b4
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl>
Gerrit-Reviewer: Ricordisamoa <ricordisa...@openmailbox.org>
Gerrit-Reviewer: XZise <commodorefabia...@gmx.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to