(total, when)
| 2893 | class SayWhenError(ValueError): pass |
| 2894 | |
| 2895 | def exception_throwing_generator(total, when): |
| 2896 | if when == -1: |
| 2897 | raise SayWhenError("Somebody said when") |
| 2898 | for i in range(total): |
| 2899 | if i == when: |
| 2900 | raise SayWhenError("Somebody said when") |
| 2901 | yield i |
| 2902 | |
| 2903 | |
| 2904 | class _TestPool(BaseTestCase): |
no test coverage detected
searching dependent graphs…