jenkins-bot submitted this change.
[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.