Page MenuHomePhabricator

testWikibase method of wikibase_tests.TestGeneral fails
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

pwb wikibase_tests -v TestGeneral.testWikibase

What happens?:

D:\pwb\GIT\core>pwb wikibase_tests -v TestGeneral.testWikibase
tests: max_retries reduced from 15 to 1
testWikibase (__main__.TestGeneral.testWikibase)
Wikibase tests. ... FAIL

======================================================================
FAIL: testWikibase (__main__.TestGeneral.testWikibase)
Wikibase tests.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\pwb\GIT\core\tests\wikibase_tests.py", line 95, in testWikibase
    self.assertTrue(item.labels['en'].lower().endswith('main page'))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 1 test in 2.287s

FAILED (failures=1)

item.labels['en'] of item Q5296 is 'Ahmadreza emami'

Event Timeline

Xqt triaged this task as High priority.Nov 13 2022, 3:10 PM

Change 856179 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] Provide a more informative AssertionError message

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

Change 856179 merged by jenkins-bot:

[pywikibot/core@master] [tests] Provide a more informative AssertionError message

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

Happens again:

D:\pwb\GIT\core>pwb wikibase_tests -v TestGeneral.testWikibase
tests: max_retries reduced from 15 to 1
FAIL

======================================================================
FAIL: testWikibase (__main__.TestGeneral.testWikibase)
Wikibase tests.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\pwb\GIT\core\tests\wikibase_tests.py", line 99, in testWikibase
    self.assertTrue(
    ~~~~~~~~~~~~~~~^
        item.labels['en'].lower().endswith('main page'),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        msg=f"\nitem.labels['en'] of item Q5296 is {item.labels['en']!r}")
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False is not true :
item.labels['en'] of item Q5296 is 'Angelus ad aras'

----------------------------------------------------------------------
Ran 1 test in 3.610s

FAILED (failures=1)