Iterate a unary function through many test cases.
(method, prec, exp_range, restricted_range, itr, stat)
| 961 | log(" result types: %s" % sorted([t for t in stat.items()])) |
| 962 | |
| 963 | def test_unary(method, prec, exp_range, restricted_range, itr, stat): |
| 964 | """Iterate a unary function through many test cases.""" |
| 965 | if method in UnaryRestricted: |
| 966 | exp_range = restricted_range |
| 967 | for op in all_unary(prec, exp_range, itr): |
| 968 | t = TestSet(method, op) |
| 969 | try: |
| 970 | if not convert(t): |
| 971 | continue |
| 972 | callfuncs(t) |
| 973 | verify(t, stat) |
| 974 | except VerifyError as err: |
| 975 | log(err) |
| 976 | |
| 977 | if not method.startswith('__'): |
| 978 | for op in unary_optarg(prec, exp_range, itr): |
| 979 | t = TestSet(method, op) |
| 980 | try: |
| 981 | if not convert(t): |
| 982 | continue |
| 983 | callfuncs(t) |
| 984 | verify(t, stat) |
| 985 | except VerifyError as err: |
| 986 | log(err) |
| 987 | |
| 988 | def test_binary(method, prec, exp_range, restricted_range, itr, stat): |
| 989 | """Iterate a binary function through many test cases.""" |
nothing calls this directly
no test coverage detected
searching dependent graphs…