jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/609392 )
Change subject: [tests] Update tests after exception message change ......................................................................
[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(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
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())
pywikibot-commits@lists.wikimedia.org