Message373807
The following testcase will always be marked as passed:
from unittest import TestCase
class BuggyTestCase(TestCase):
def test_generator(self):
self.assertTrue(False)
yield None
It happened to us that someone accidentally made the test method a generator function. That error was caught very late, because it always appears to have executed correctly.
Maybe an additional check can be introduced in the unittest module, to check if a test_ method was executed correctly? |
|
Date |
User |
Action |
Args |
2020-07-17 09:46:57 | defreng | set | recipients:
+ defreng |
2020-07-17 09:46:57 | defreng | set | messageid: <1594979217.32.0.316534480608.issue41322@roundup.psfhosted.org> |
2020-07-17 09:46:57 | defreng | link | issue41322 messages |
2020-07-17 09:46:56 | defreng | create | |
|