Iterate the __format__ method through many test cases.
(method, prec, exp_range, restricted_range, itr, stat)
| 1036 | log(err) |
| 1037 | |
| 1038 | def test_format(method, prec, exp_range, restricted_range, itr, stat): |
| 1039 | """Iterate the __format__ method through many test cases.""" |
| 1040 | for op in all_unary(prec, exp_range, itr): |
| 1041 | fmt1 = rand_format(chr(random.randrange(0, 128)), 'EeGgn') |
| 1042 | fmt2 = rand_locale() |
| 1043 | for fmt in (fmt1, fmt2): |
| 1044 | fmtop = (op[0], fmt) |
| 1045 | t = TestSet(method, fmtop) |
| 1046 | try: |
| 1047 | if not convert(t, convstr=False): |
| 1048 | continue |
| 1049 | callfuncs(t) |
| 1050 | verify(t, stat) |
| 1051 | except VerifyError as err: |
| 1052 | log(err) |
| 1053 | for op in all_unary(prec, 9999, itr): |
| 1054 | fmt1 = rand_format(chr(random.randrange(0, 128)), 'Ff%') |
| 1055 | fmt2 = rand_locale() |
| 1056 | for fmt in (fmt1, fmt2): |
| 1057 | fmtop = (op[0], fmt) |
| 1058 | t = TestSet(method, fmtop) |
| 1059 | try: |
| 1060 | if not convert(t, convstr=False): |
| 1061 | continue |
| 1062 | callfuncs(t) |
| 1063 | verify(t, stat) |
| 1064 | except VerifyError as err: |
| 1065 | log(err) |
| 1066 | |
| 1067 | def test_round(method, prec, exprange, restricted_range, itr, stat): |
| 1068 | """Iterate the __round__ method through many test cases.""" |
nothing calls this directly
no test coverage detected
searching dependent graphs…