jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Pagegen test: Only do LiveRC test if installed ......................................................................
[FIX] Pagegen test: Only do LiveRC test if installed
If socketIO_client is not installed, the live RC tests should be skipped.
Change-Id: I77e72d71244b940ff543a4cd819d875a7d231a3d --- M tests/pagegenerators_tests.py 1 file changed, 10 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py index 3c4e632..723d4ac 100755 --- a/tests/pagegenerators_tests.py +++ b/tests/pagegenerators_tests.py @@ -670,9 +670,18 @@
length = 3
+ @classmethod + def setUpClass(cls): + super(LiveRCPageGeneratorTestCase, cls).setUpClass() + try: + import socketIO_client # noqa + except ImportError: + raise unittest.SkipTest('socketIO_client not available') + def test_RC_pagegenerator_result(self): site = self.get_site() - pagegenerator = pagegenerators.LiveRCPageGenerator(site, total=self.length) + pagegenerator = pagegenerators.LiveRCPageGenerator(site, + total=self.length) entries = list(pagegenerator) self.assertEqual(len(entries), self.length)
pywikibot-commits@lists.wikimedia.org