(formatstr, args, output=None, limit=None, overflowok=False)
| 49 | print('yes') |
| 50 | |
| 51 | def testcommon(formatstr, args, output=None, limit=None, overflowok=False): |
| 52 | # if formatstr is a str, test str, bytes, and bytearray; |
| 53 | # otherwise, test bytes and bytearray |
| 54 | if isinstance(formatstr, str): |
| 55 | testformat(formatstr, args, output, limit, overflowok) |
| 56 | b_format = formatstr.encode('ascii') |
| 57 | else: |
| 58 | b_format = formatstr |
| 59 | ba_format = bytearray(b_format) |
| 60 | if output is None: |
| 61 | b_output = ba_output = None |
| 62 | else: |
| 63 | if isinstance(output, str): |
| 64 | b_output = output.encode('ascii') |
| 65 | else: |
| 66 | b_output = output |
| 67 | ba_output = bytearray(b_output) |
| 68 | testformat(b_format, args, b_output, limit, overflowok) |
| 69 | testformat(ba_format, args, ba_output, limit, overflowok) |
| 70 | |
| 71 | def test_exc(formatstr, args, exception, excmsg): |
| 72 | try: |
no test coverage detected
searching dependent graphs…