https://bugzilla.wikimedia.org/show_bug.cgi?id=73513

--- Comment #1 from John Mark Vandenberg <[email protected]> ---
(In reply to John Mark Vandenberg from comment #0)
> It would be good to add another farm to our test builds.  We have a few
> Wikia already in family files, and other family classes are -2'd , so Wikia
> it is.

Wikia is currently 1.19.20

> Here are the Wikia failures (using py3):
> 
> api_tests.TestParamInfo.test_new_mode
> 
> Traceback (most recent call last):
>   File "./tests/api_tests.py", line 231, in test_new_mode
>     pi.fetch(['info'])
>   File "./pywikibot/data/api.py", line 268, in fetch
>     self._init()
>   File "./pywikibot/data/api.py", line 202, in _init
>     main_modules_param = self.parameter('main', 'action')
>   File "./pywikibot/data/api.py", line 379, in parameter
>     self.fetch(set([module]))
>   File "./pywikibot/data/api.py", line 281, in fetch
>     assert(self._query_modules or _init)

v1.19 doesnt support the new mode; e.g.

http://www.wikia.com/api.php?format=jsonfm&modules=query+siteinfo&action=paraminfo

Im not sure which version it was added

> site_tests.TestSiteTokens.test_tokens_in_mw_119
> 
> Traceback (most recent call last):
>   File "./tests/site_tests.py", line 1239, in test_tokens_in_mw_119
>     self._test_tokens(None, '1.19', 'edit', 'delete')
>   File "./tests/site_tests.py", line 1235, in _test_tokens
>     self.assertIn(in_tested, self.mysite.tokens)
> AssertionError: 'edit' not found in {'Jayvdb': {}}

not high priority; need to skip this test if user doesnt have edit.  Or add
can-edit to the 'user = True' aspects flag.

> site_tests.TestSiteObjectDeprecatedFunctions.test_token
> 
> Traceback (most recent call last):
>   File "./tests/site_tests.py", line 57, in test_token
>     token = mysite.tokens[ttype]
>   File "./pywikibot/site.py", line 1341, in __getitem__
>     .format(key, self.site.user(), self.site))
> pywikibot.exceptions.Error: Action 'edit' is not allowed for user Jayvdb on
> wikia:wikia wiki.

as above

> site_tests.SiteUserTestCase.testSearch
> 
> Traceback (most recent call last):
>   File "./tests/site_tests.py", line 887, in testSearch
>     se = list(mysite.search("wiki", total=100))
>   File "./pywikibot/data/api.py", line 1452, in __iter__
>     self.data = self.request.submit()
>   File "./pywikibot/data/api.py", line 1071, in submit
>     raise APIError(code, info, **result["error"])
> pywikibot.data.api.APIError: gsrsearch-text-disabled: text search is disabled

This should be detected and become a skiptest

> site_tests.SiteUserTestCase2.testPatrol
> 
> Traceback (most recent call last):
>   File "./pywikibot/site.py", line 1323, in __getitem__
>     key = self.site.validate_tokens([key])[0]
> IndexError: list index out of range
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "./tests/site_tests.py", line 1155, in testPatrol
>     result = list(mysite.patrol(rcid=rc['rcid']))
>   File "./pywikibot/site.py", line 4232, in patrol
>     token = self.tokens['patrol']
>   File "./pywikibot/site.py", line 1327, in __getitem__
>     .format(key, self.site))
> pywikibot.exceptions.Error: Requested token 'patrol' is invalid on
> wikia:wikia wiki.

testPatrol should check it can get a patrol token, and skip test if not

> page_tests.TestPageObject.testLinks
> 
> Traceback (most recent call last):
>   File "./tests/page_tests.py", line 461, in testLinks
>     iw = list(mainpage.interwiki(expand=True))
>   File "./pywikibot/page.py", line 1150, in interwiki
>     text = self.expand_text()
>   File "./pywikibot/tools.py", line 647, in wrapper
>     return obj(*__args, **__kw)
>   File "./pywikibot/page.py", line 499, in expand_text
>     includecomments=includecomments)
>   File "./pywikibot/site.py", line 992, in callee
>     return fn(self, *args, **kwargs)
>   File "./pywikibot/site.py", line 1958, in expand_text
>     return req.submit()['expandtemplates'][key]
>   File "./pywikibot/data/api.py", line 1213, in submit
>     self._data = super(CachedRequest, self).submit()
>   File "./pywikibot/data/api.py", line 1071, in submit
>     raise APIError(code, info, **result["error"])
> pywikibot.data.api.APIError: notext: The text parameter must be set

Both Page and Site methods should avoid expanding templates for the empty
string.

> wikibase_tests.TestPageMethods.test_item_templates
> 
> Traceback (most recent call last):
>   File "./tests/wikibase_tests.py", line 554, in test_item_templates
>     self.wdp.templatesWithParams()
>   File "./pywikibot/tools.py", line 647, in wrapper
>     return obj(*__args, **__kw)
>   File "./pywikibot/page.py", line 1288, in templatesWithParams
>     templates = textlib.extract_templates_and_params(self.text)
>   File "./pywikibot/textlib.py", line 973, in extract_templates_and_params
>     return extract_templates_and_params_regex(text)
>   File "./pywikibot/textlib.py", line 1000, in
> extract_templates_and_params_regex
>     thistxt = removeDisabledParts(text)
>   File "./pywikibot/textlib.py", line 327, in removeDisabledParts
>     return toRemoveR.sub('', text)
> TypeError: expected string or buffer
> 
> (this one is unrelated I believe.. but I thought we fixed this??)
> 
> Many of these require the test suite to be a bit more intelligent about user
> rights.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to