Page MenuHomePhabricator

testLocalOnly AssertionError
Closed, ResolvedPublic

Description

https://travis-ci.org/wikimedia/pywikibot-core/jobs/205736377#L3929

_________________________ TestShareFiles.testLocalOnly _________________________

self = <tests.file_tests.TestShareFiles testMethod=testLocalOnly>

    def testLocalOnly(self):

        """Test fileIsShared() on file page with local file only."""

        title = 'File:April Fools Day Adminship discussion (2005).png'

    

        commons = self.get_site('commons')

        enwp = self.get_site('enwiki')

        enwp_file = pywikibot.FilePage(enwp, title)

        for using in enwp_file.usingPages():

            self.assertIsInstance(using, pywikibot.Page)

    

        commons_file = pywikibot.FilePage(commons, title)

    

        self.assertTrue(enwp_file.fileUrl())

>       self.assertTrue(enwp_file.exists())

E       AssertionError: False is not true

The reason is that "File:April Fools Day Adminship discussion (2005).png" has been recently moved to commons. See: https://en.wikipedia.org/w/index.php?title=Special%3ALog&type=delete&user=&page=File%3AApril+Fools+Day+Adminship+discussion+%282005%29.png&year=&month=-1&tagfilter=&hide_thanks_log=1&hide_tag_log=1&hide_review_log=1

Related Objects

StatusSubtypeAssignedTask
ResolvedMagul
ResolvedDalba

Event Timeline

Change 340293 had a related patch set uploaded (by Dalba; owner: Dalba):
file_tests.testLocalOnly: Use a different file for testing

https://gerrit.wikimedia.org/r/340293

Change 340293 merged by jenkins-bot:
[pywikibot/core] file_tests.testLocalOnly: Use a different file for testing

https://gerrit.wikimedia.org/r/340293