jenkins-bot submitted this change.

View Change


Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[tests] run subtest with test_unconnected_with_repo

run subtest with pagegenerators_tests within
TestUnconnectedPageGenerator.test_unconnected_with_repo to
have more tests and a more informative error message if it fails.

Change-Id: I93a8f08e14226a3efc1290786e4f6311a5f0dd10
---
M tests/pagegenerators_tests.py
1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index 6c2b890..8b8c05a 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -1687,11 +1687,11 @@
self.assertLessEqual(len(pages), 3)

site = self.site.data_repository()
- pattern = (r'Page '
- r'\[\[({site.sitename}:|{site.code}:)-1\]\]'
- r" doesn't exist\.".format(site=site))
+ pattern = (fr'Page \[\[({site.sitename}:|{site.code}:)-1\]\]'
+ r" doesn't exist\.")
for page in pages:
- with self.assertRaisesRegex(NoPageError, pattern):
+ with self.subTest(page=page), self.assertRaisesRegex(
+ NoPageError, pattern):
page.data_item()

def test_unconnected_without_repo(self):

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

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