Iterate the __float__ method through many test cases.
(method, prec, exprange, restricted_range, itr, stat)
| 1079 | log(err) |
| 1080 | |
| 1081 | def test_from_float(method, prec, exprange, restricted_range, itr, stat): |
| 1082 | """Iterate the __float__ method through many test cases.""" |
| 1083 | for rounding in RoundModes: |
| 1084 | context.rounding = rounding |
| 1085 | for i in range(1000): |
| 1086 | f = randfloat() |
| 1087 | op = (f,) if method.startswith("context.") else ("sNaN", f) |
| 1088 | t = TestSet(method, op) |
| 1089 | try: |
| 1090 | if not convert(t): |
| 1091 | continue |
| 1092 | callfuncs(t) |
| 1093 | verify(t, stat) |
| 1094 | except VerifyError as err: |
| 1095 | log(err) |
| 1096 | |
| 1097 | def randcontext(exprange): |
| 1098 | c = Context(C.Context(), P.Context()) |
nothing calls this directly
no test coverage detected
searching dependent graphs…