Page MenuHomePhabricator

pagegenerators_tests.TestFactoryGenerator.test_linter_generator_show fails with UnknownExtension
Closed, ResolvedPublic

Description

_______________ TestFactoryGenerator.test_linter_generator_show ________________

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

    def test_linter_generator_show(self):
        """Test generator of pages with lint errors."""
        gf = pagegenerators.GeneratorFactory(site=self.site)
        with self.assertRaises(SystemExit) as cm:
>           gf.handleArg('-linter:show')

tests/pagegenerators_tests.py:1224: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pywikibot/pagegenerators.py:1221: in handleArg
    handler_result = handler(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def _handle_linter(self, value):
        """Handle `-linter` argument."""
        if not self.site.has_extension('Linter'):
            raise UnknownExtension(
>               '-linter needs a site with Linter extension.')
E           pywikibot.exceptions.UnknownExtension: -linter needs a site with Linter extension.

pywikibot/pagegenerators.py:715: UnknownExtension

https://api.travis-ci.org/v3/job/488094013/log.txt

Details

Related Gerrit Patches:

Event Timeline

Xqt created this task.Feb 3 2019, 3:18 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptFeb 3 2019, 3:18 PM
Xqt claimed this task.Feb 3 2019, 3:18 PM
Xqt triaged this task as High priority.

Change 487657 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [tests] Test for UnknownExtension if 'Linter' is not available

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

Xqt moved this task from Backlog to Priority review needed on the Pywikibot board.Feb 3 2019, 3:32 PM

Change 487657 merged by jenkins-bot:
[pywikibot/core@master] [tests] Test for UnknownExtension if 'Linter' is not available

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

Mpaa closed this task as Resolved.Feb 3 2019, 4:32 PM