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/224622765

_____________________ TestSiteGenerators.test_unconnected ______________________

self = <tests.site_tests.TestSiteGenerators testMethod=test_unconnected>

    def test_unconnected(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.now() - 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: 'enwiki' unexpectedly found in {'enwiki': {'title': 'Ravinder K. Jain', 'badges': [], 'site': 'enwiki'}} : Page "Ravinder K. Jain" is connected to a Wikibase repository

There is a bot that creates items for newly created pages of English Wikipedia. See:

The test already tries to ignore any item revision that is at least 5 minutes old, but apparently there is a flaw in the logic or maybe the 5 minute buffer is not enough, or both.


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

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