https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
Bug ID: 64137 Summary: Revision key not found Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: info@gno.de Web browser: --- Mobile Platform: ---
Running page_tests an error occurs:
c:\Pywikipedia\ssh\pywikibot\core>pwb.py tests/page_tests ...E............. ====================================================================== ERROR: testApiMethods (__main__.TestPageObject) Test various methods that rely on API. ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/page_tests.py", line 297, in testApiMethods self.assertType(mainpage.editTime(), pywikibot.Timestamp) File "C:\Pywikipedia\ssh\pywikibot\core\pywikibot\page.py", line 457, in editT ime return self._revisions[rev].timestamp KeyError: 598252063
---------------------------------------------------------------------- Ran 17 tests in 0.440s
FAILED (errors=1)
c:\Pywikipedia\ssh\pywikibot\core>
Seems that self.site.loadrevisions(self) in editTime() method does not load the needed revision as expected.
https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
Mpaa mpaa.wiki@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mpaa.wiki@gmail.com
--- Comment #1 from Mpaa mpaa.wiki@gmail.com --- Works for me after cleaning apicache.
https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
--- Comment #2 from Mpaa mpaa.wiki@gmail.com --- The following fails if family is not "wikipedia" in user-config.py:
....F............ ====================================================================== FAIL: testGeneral (page_tests.TestPageObject) ---------------------------------------------------------------------- Traceback (most recent call last): File "page_tests.py", line 116, in testGeneral % (site.lang, mainpage.title())) AssertionError: '[[wikipedia:en:Main Page]]' != u'[[en:Main Page]]'
---------------------------------------------------------------------- Ran 17 tests in 1.200s
It should not be mandatory to run tests using wikipedia as config family.
https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
--- Comment #3 from xqt info@gno.de --- Cleaning the api cache was my first thougth but it still happened
https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
--- Comment #4 from xqt info@gno.de --- 2nd part (AssertionError) fixed in https://gerrit.wikimedia.org/r/#/c/127435/
https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 127435 had a related patch set uploaded by Merlijn van Deen: (bug 64137) Some more Page.title() testing
https://gerrit.wikimedia.org/r/127435
https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
--- Comment #6 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 127435 merged by jenkins-bot: (bug 64137) Some more Page.title() testing
https://gerrit.wikimedia.org/r/127435
https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |NEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=64137
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from xqt info@gno.de --- I found it: It was apicache. But why does tests have it's own cache?
pywikipedia-bugs@lists.wikimedia.org