Dalba added a comment.

This happened again in the most recent build:

https://travis-ci.org/wikimedia/pywikibot-core/jobs/237516255

        self.assertCountEqual(

>           set(mysite.pagelinks(mainpage, namespaces=[0, 1])) - links, [])

E       AssertionError: Element counts were not equal:

E       First has 1, Second has 0:  Page('Manuel Noriega')

Apparently, the link has been added while the test has been running.

I have another solution that is simple to implement and may even be considered more trustworthy and efficient than just retrying the test suite:

We can re-fetch the set of linked pages and compare it with the original set, if the set has changed we may conclude that the page content has changed and the AssertionError is safe to be ignored.

I'll send a patch for review soon ...


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

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

To: Magul, Dalba
Cc: Lokal_Profil, valhallasw, Dalba, XXN, Xqt, Magul, gerritbot, jayvdb, pywikibot-bugs-list, Aklapper, XZise, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, GPHemsley, Nemo_bis, Darkdadaah, Masti, Alchimista, Rxy, Krenair
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to