http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11601
Revision: 11601 Author: legoktm Date: 2013-05-31 03:39:38 +0000 (Fri, 31 May 2013) Log Message: ----------- Fix for r11595, since they're already Timestamp objects. Also fix unit tests.
Modified Paths: -------------- branches/rewrite/pywikibot/page.py branches/rewrite/tests/page_tests.py
Modified: branches/rewrite/pywikibot/page.py =================================================================== --- branches/rewrite/pywikibot/page.py 2013-05-31 03:30:35 UTC (rev 11600) +++ branches/rewrite/pywikibot/page.py 2013-05-31 03:39:38 UTC (rev 11601) @@ -1119,7 +1119,7 @@ self.site.loadrevisions(self, getText=False, rvdir=reverseOrder, step=step, total=total) return [ ( self._revisions[rev].revid, - pywikibot.Timestamp.fromISOformat(self._revisions[rev].timestamp), + self._revisions[rev].timestamp, self._revisions[rev].user, self._revisions[rev].comment ) for rev in sorted(self._revisions,
Modified: branches/rewrite/tests/page_tests.py =================================================================== --- branches/rewrite/tests/page_tests.py 2013-05-31 03:30:35 UTC (rev 11600) +++ branches/rewrite/tests/page_tests.py 2013-05-31 03:39:38 UTC (rev 11601) @@ -227,7 +227,7 @@ self.assertType(mainpage.isDisambig(), bool) self.assertType(mainpage.canBeEdited(), bool) self.assertType(mainpage.botMayEdit(), bool) - self.assertType(mainpage.editTime(), unicode) + self.assertType(mainpage.editTime(), pywikibot.Timestamp) self.assertType(mainpage.previousRevision(), int) self.assertType(mainpage.permalink(), basestring)
pywikipedia-svn@lists.wikimedia.org