Dalba created this task.
Dalba added projects: Pywikibot-core, Pywikibot-tests.
Herald added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION

https://travis-ci.org/wikimedia/pywikibot-core/jobs/226186262#L3970

___________ TestUnconnectedPageGenerator.test_unconnected_with_repo ____________

self = <tests.pagegenerators_tests.TestUnconnectedPageGenerator testMethod=test_unconnected_with_repo>

    def test_unconnected_with_repo(self):

        """Test that the ItemPage returned raises NoPage."""

        if not self.site.data_repository():

            raise unittest.SkipTest('Site is not using a Wikibase repository')

        if self.site.hostname() == 'test.wikipedia.org':

            raise unittest.SkipTest('test.wikipedia is misconfigured; T85358')

        cnt = 0

        start_time = datetime.datetime.now() - datetime.timedelta(minutes=5)

        # Pages which have been connected recently may still be reported as

        # unconnected. So try on an version that is a few minutes older if the

        # tested site appears as a sitelink.

        for page in self.site.unconnected_pages(total=5):

            try:

                item = pywikibot.ItemPage.fromPage(page)

            except pywikibot.NoPage:

                pass

            else:

                revisions = list(item.revisions(total=1, starttime=start_time,

                                                content=True))

                if revisions:

                    sitelinks = json.loads(revisions[0].text)['sitelinks']

                    self.assertNotIn(

                        self.site.dbName(), sitelinks,

                        'Page "{0}" is connected to a Wikibase '

>                       'repository'.format(page.title()))

E                   AssertionError: Page "Zoltán Remák" is connected to a Wikibase repository

I think I fixed the exact same test in T163619: TestSiteGenerators.test_unconnected occasionally fails (50f01ee9fd74).


TASK DETAIL
https://phabricator.wikimedia.org/T163975

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dalba
Cc: Aklapper, pywikibot-bugs-list, Dalba, Magul, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, Sn1per, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to