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.
Description
Description
Details
Details
Related Changes in Gerrit:
| Subject | Author | Repo | Branch | Lines +/- | |
|---|---|---|---|---|---|
| tests: Add assertHasItems helper for non-empty iterables | Xqt | pywikibot/core | master | +49 -5 |
Event Timeline
Comment Actions
Change #1319943 had a related patch set uploaded (by Xqt; author: Xqt):
[pywikibot/core@master] tests: Add assertHasItems helper for non-empty iterables
Comment Actions
Change #1319943 merged by jenkins-bot:
[pywikibot/core@master] tests: Add assertHasItems helper for non-empty iterables