jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/509628 )
Change subject: [tests] Remove allowed_failure decorators ......................................................................
[tests] Remove allowed_failure decorators
- both test methods test_many_continuations_limited and test_two_continuations_limited passes. The decorator can be removed then and Bug: T75461 can be closed - remove disabled _test_two_continuations_limited_long_test test because it needs 20' to process.
Bug: T223030 Change-Id: Ifcb2b543df11850316d4003234cd803c29f8e625 --- M tests/api_tests.py 1 file changed, 1 insertion(+), 26 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/api_tests.py b/tests/api_tests.py index 05a6af7..9cd52b3 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -31,7 +31,7 @@ DefaultSiteTestCase, DefaultDrySiteTestCase, ) -from tests.utils import allowed_failure, FakeLoginManager, PatchedHttp +from tests.utils import FakeLoginManager, PatchedHttp
if not PY2: from urllib.parse import unquote_to_bytes @@ -745,7 +745,6 @@ count += 1 self.assertLength(links, count)
- @allowed_failure def test_many_continuations_limited(self): """Test PropertyGenerator with many limited props.""" mainpage = self.get_mainpage() @@ -773,12 +772,9 @@ self.assertIn('pageid', pagedata) count += 1 self.assertLength(links, count) - # FIXME: AssertionError: 30 != 6150
- @allowed_failure def test_two_continuations_limited(self): """Test PropertyGenerator with many limited props and continuations.""" - # FIXME: test fails mainpage = self.get_mainpage() links = list(self.site.pagelinks(mainpage, total=30)) titles = [l.title(with_section=False) @@ -795,27 +791,6 @@ self.assertIn('pageid', pagedata) count += 1 self.assertLength(links, count) - # FIXME: AssertionError: 30 != 11550 - - # FIXME: test disabled as it takes longer than 10 minutes - def _test_two_continuations_limited_long_test(self): - """Long duration test, with total & step that are a real scenario.""" - mainpage = self.get_mainpage() - links = list(mainpage.backlinks(total=300)) - titles = [l.title(with_section=False) - for l in links] - gen = api.PropertyGenerator( - site=self.site, prop='info|categoryinfo|langlinks|templates', - parameters={'titles': '|'.join(titles)}) - # Force the generator into continuation mode - gen.set_query_increment(50) - - count = 0 - for pagedata in gen: - self.assertIsInstance(pagedata, dict) - self.assertIn('pageid', pagedata) - count += 1 - self.assertLength(links, count)
class TestDryQueryGeneratorNamespaceParam(TestCase):
pywikibot-commits@lists.wikimedia.org