jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[tests] Update tests after  exception message change

follow-up for 1da509e1044e

Bug: T257103
Change-Id: Id28f6eb5ab128b8bff3047dd6b696a3641637ee4
---
M tests/wikibase_tests.py
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index 5c62b20..546da66 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -711,14 +711,14 @@

def test_WbGeoShape_error_on_non_page(self):
"""Test WbGeoShape error handling when given a non-page."""
- regex = r'^Page must be a pywikibot\.Page object\.$'
+ regex = r'^Page .+? must be a pywikibot\.Page object not a'
with self.assertRaisesRegex(ValueError, regex):
pywikibot.WbGeoShape('A string', self.get_repo())

def test_WbGeoShape_error_on_non_exitant_page(self):
"""Test WbGeoShape error handling of a non-existant page."""
page = Page(self.commons, 'Non-existant page... really')
- regex = r'^Page must exist\.$'
+ regex = r'^Page \[\[.+?\]\] must exist\.$'
with self.assertRaisesRegex(ValueError, regex):
pywikibot.WbGeoShape(page, self.get_repo())

@@ -787,14 +787,14 @@

def test_WbTabularData_error_on_non_page(self):
"""Test WbTabularData error handling when given a non-page."""
- regex = r'^Page must be a pywikibot\.Page object\.$'
+ regex = r'^Page .+? must be a pywikibot\.Page object not a'
with self.assertRaisesRegex(ValueError, regex):
pywikibot.WbTabularData('A string', self.get_repo())

def test_WbTabularData_error_on_non_exitant_page(self):
"""Test WbTabularData error handling of a non-existant page."""
page = Page(self.commons, 'Non-existant page... really')
- regex = r'^Page must exist\.$'
+ regex = r'^Page \[\[.+?\]\] must exist\.$'
with self.assertRaisesRegex(ValueError, regex):
pywikibot.WbTabularData(page, self.get_repo())


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

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