Iterate a binary function through many test cases.
(method, prec, exp_range, restricted_range, itr, stat)
| 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.""" |
| 990 | if method in BinaryRestricted: |
| 991 | exp_range = restricted_range |
| 992 | for op in all_binary(prec, exp_range, itr): |
| 993 | t = TestSet(method, op) |
| 994 | try: |
| 995 | if not convert(t): |
| 996 | continue |
| 997 | callfuncs(t) |
| 998 | verify(t, stat) |
| 999 | except VerifyError as err: |
| 1000 | log(err) |
| 1001 | |
| 1002 | if not method.startswith('__'): |
| 1003 | for op in binary_optarg(prec, exp_range, itr): |
| 1004 | t = TestSet(method, op) |
| 1005 | try: |
| 1006 | if not convert(t): |
| 1007 | continue |
| 1008 | callfuncs(t) |
| 1009 | verify(t, stat) |
| 1010 | except VerifyError as err: |
| 1011 | log(err) |
| 1012 | |
| 1013 | def test_ternary(method, prec, exp_range, restricted_range, itr, stat): |
| 1014 | """Iterate a ternary function through many test cases.""" |
nothing calls this directly
no test coverage detected
searching dependent graphs…