jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[tests] Update test_similar_scripts_found

Update the test and check remaining lines in stderr

Change-Id: I9948132e439e9ade4784adc594d292acf41bffe1
---
M tests/pwb_tests.py
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/tests/pwb_tests.py b/tests/pwb_tests.py
index feacd38..e86be66 100644
--- a/tests/pwb_tests.py
+++ b/tests/pwb_tests.py
@@ -114,12 +114,15 @@
'The most similar scripts are:',
'1 - interwikidata',
'2 - interwiki',
+ '3 - illustrate_wikidata',
]
stderr = io.StringIO(
execute_pwb(['inter_wikidata'], data_in='q')['stderr'])
for line in result:
with self.subTest(line=line):
self.assertEqual(stderr.readline().strip(), line)
+ remaining = stderr.readlines()
+ self.assertLength(remaining, 3) # always 3 lines remaining after list


if __name__ == '__main__': # pragma: no cover

To view, visit change 742209. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I9948132e439e9ade4784adc594d292acf41bffe1
Gerrit-Change-Number: 742209
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged