jenkins-bot submitted this change.

View Change

Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified
[tests] Test expected result in PatrolTestCase

Change-Id: I12163fa84ea21820c330f1c796974ccc043020d0
---
M tests/site_tests.py
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/site_tests.py b/tests/site_tests.py
index 1467d84..1f1abf2 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -2214,6 +2214,7 @@
if mysite.mw_version >= '1.22':
params['revid'] = [0, 1]

+ raised = False
try:
# no such rcid, revid or too old revid
list(mysite.patrol(**params))
@@ -2222,7 +2223,8 @@
self.skipTest(error)
except pywikibot.Error:
# expected result
- pass
+ raised = True
+ self.assertTrue(raised, msg='pywikibot.Error not raised')


class SiteRandomTestCase(DefaultSiteTestCase):

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I12163fa84ea21820c330f1c796974ccc043020d0
Gerrit-Change-Number: 621863
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged