Page MenuHomePhabricator

pywikibot test_set_redirect_target fails
Open, Needs TriagePublic

Description

I just noticed that running test_set_redirect_target fails.

As a follow up. Are these tests run as part of the merge/+2 mechanism in gerrit?

I ran it using python pwb.py tests/wikibase_edit_tests.py TestWikibaseWriteGeneral.test_set_redirect_target with PYWIKIBOT2_TEST_WRITE=1 which returns

======================================================================
ERROR: test_set_redirect_target (__main__.TestWikibaseWriteGeneral)
Test set_redirect_target method.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/wikibase_edit_tests.py", line 167, in test_set_redirect_target
    item.set_redirect_target(target_id, force=True)
  File "/home/andre/pywikibot-core/pywikibot/page.py", line 3922, in set_redirect_target
    if self.exists() and not self.isRedirectPage() and not force:
  File "/home/andre/pywikibot-core/pywikibot/page.py", line 3271, in exists
    self.get()
  File "/home/andre/pywikibot-core/pywikibot/page.py", line 3740, in get
    raise pywikibot.IsRedirectPage(self)
IsRedirectPage: Page [[wikidata:test:Q1107]] is a redirect page.

----------------------------------------------------------------------
Ran 1 test in 2.613s

FAILED (errors=1)

Event Timeline

Lokal_Profil raised the priority of this task from to Needs Triage.
Lokal_Profil updated the task description. (Show Details)
Lokal_Profil added subscribers: Lokal_Profil, Ladsgroup.

Write tests are not run by Jenkins or Travis-CI.

Could you include a brief description of why the test fails; a dump of the exception, etc?

https://gerrit.wikimedia.org/r/#/c/237610/ has some related changes; not sure if that will fix the problem you are seeing.

Lokal_Profil set Security to None.

I added the output to the description