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/210180324#L3903

=================================== FAILURES ===================================

___________ TestFactoryGenerator.test_pages_with_property_generator ____________

self = <tests.pagegenerators_tests.TestFactoryGenerator testMethod=test_pages_with_property_generator>

    def test_pages_with_property_generator(self):

        """Test the pages_with_property_generator method."""

        mysite = self.get_site()

        for item in ('defaultsort', 'disambiguation', 'displaytitle',

                     'hiddencat', 'invalid_property'):

            if item in mysite.get_property_names():

                gf = pagegenerators.GeneratorFactory()

>               gf.handleArg('-property:{0}'.format(item))

tests/pagegenerators_tests.py:1031: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pywikibot/pagegenerators.py:681: in handleArg

    gen = page_with_property_generator(value, site=self.site)

pywikibot/pagegenerators.py:2202: in page_with_property_generator

    return site.pages_with_property(name, total=total)

pywikibot/site.py:1357: in callee

    return fn(self, *args, **kwargs)

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = APISite("fa", "wiktionary"), propname = 'disambiguation', total = None

    @need_version('1.21')

    def pages_with_property(self, propname, total=None):

        """Yield Page objects from Special:PagesWithProp.

    

            @param propname: must be a valid property.

            @type propname: str

            @param total: number of pages to return

            @type total: int or None

            @return: return a generator of Page objects

            @rtype: iterator

            """

        if propname not in self.get_property_names():

            raise NotImplementedError(

>               '"{0}" is not a valid page property'.format(propname))

E           NotImplementedError: "disambiguation" is not a valid page property

I cannot reproduce this issue on my PC. The strange thing for me is the APISite("fa", "wiktionary"), I don't know where it is coming from.

This test has been added 4 commits ago and in all of them 6 jobs have failed on this test, 14 have passed it successfully, and one (job number 10) does not execute this this.


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

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