Page MenuHomePhabricator

test_DeleteEntry_dewp (tests.logentry_tests.TestLogentries) fails for hidden comment
Closed, ResolvedPublic

Description

5626ERROR: test_DeleteEntry_dewp (tests.logentry_tests.TestLogentries)

5627Test a single logtype entry on wikipedia:de

5628----------------------------------------------------------------------

5629Traceback (most recent call last):

5630  File "/home/travis/build/wikimedia/pywikibot-core/tests/aspects.py", line 725, in wrapped_method

5631    func(self, key)

5632  File "/home/travis/build/wikimedia/pywikibot-core/tests/logentry_tests.py", line 108, in test_logevent

5633    self._test_logevent(logtype)

5634  File "/home/travis/build/wikimedia/pywikibot-core/tests/logentry_tests.py", line 78, in _test_logevent

5635    self.assertIsInstance(logentry.comment(), unicode)

5636  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 150, in comment

5637    return self.data['comment']

5638  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 37, in __missing__

5639    raise KeyError("Log entry (%s) has no '%s' key" % (self._type, key))

5640KeyError: u"Log entry (delete) has no 'comment' key"

5641

5642----------------------------------------------------------------------

5643Ran 1743 tests in 585.750s

5644

5645FAILED (errors=1, skipped=72, expected failures=17, unexpected successes=2)

Event Timeline

Xqt triaged this task as High priority.Sep 10 2017, 7:50 PM

Change 377067 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Check KeyError for hidden logentry comment

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

Dalba claimed this task.
Dalba reassigned this task from Dalba to Xqt.
Dalba subscribed.

Change 377067 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Check KeyError for hidden logentry comment

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