(formatstr, args, exception, excmsg)
| 69 | testformat(ba_format, args, ba_output, limit, overflowok) |
| 70 | |
| 71 | def test_exc(formatstr, args, exception, excmsg): |
| 72 | try: |
| 73 | testformat(formatstr, args) |
| 74 | except exception as exc: |
| 75 | if str(exc) == excmsg: |
| 76 | if verbose: |
| 77 | print("yes") |
| 78 | else: |
| 79 | if verbose: print('no') |
| 80 | print('Unexpected ', exception, ':', repr(str(exc))) |
| 81 | raise |
| 82 | except: |
| 83 | if verbose: print('no') |
| 84 | print('Unexpected exception') |
| 85 | raise |
| 86 | else: |
| 87 | raise TestFailed('did not get expected exception: %s' % excmsg) |
| 88 | |
| 89 | def test_exc_common(formatstr, args, exception, excmsg): |
| 90 | # test str and bytes |
no test coverage detected
searching dependent graphs…