Page MenuHomePhabricator

Generator tests should verify that generators are not empty
Open, HighPublicBUG REPORT

Description

Some generator tests iterate over the returned generator without checking whether it yields any items. If the generator is empty, the test passes without exercising any assertions. The tests should explicitly verify that the generator is not empty.

Details

Event Timeline

Xqt triaged this task as High priority.
Xqt changed the subtype of this task from "Task" to "Bug Report".
Xqt moved this task from Backlog to New tests needed on the Pywikibot-tests board.

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

[pywikibot/core@master] tests: Add assertHasItems helper for non-empty iterables

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

Change #1319943 merged by jenkins-bot:

[pywikibot/core@master] tests: Add assertHasItems helper for non-empty iterables

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