Determine untested, C-only and Python-only attributes. Uncomment print lines for debugging.
(funcdict, c_cls, p_cls)
| 1122 | |
| 1123 | |
| 1124 | def check_untested(funcdict, c_cls, p_cls): |
| 1125 | """Determine untested, C-only and Python-only attributes. |
| 1126 | Uncomment print lines for debugging.""" |
| 1127 | c_attr = set(dir(c_cls)) |
| 1128 | p_attr = set(dir(p_cls)) |
| 1129 | intersect = c_attr & p_attr |
| 1130 | |
| 1131 | funcdict['c_only'] = tuple(sorted(c_attr-intersect)) |
| 1132 | funcdict['p_only'] = tuple(sorted(p_attr-intersect)) |
| 1133 | |
| 1134 | tested = set() |
| 1135 | for lst in funcdict.values(): |
| 1136 | for v in lst: |
| 1137 | v = v.replace("context.", "") if c_cls == C.Context else v |
| 1138 | tested.add(v) |
| 1139 | |
| 1140 | funcdict['untested'] = tuple(sorted(intersect-tested)) |
| 1141 | |
| 1142 | # for key in ('untested', 'c_only', 'p_only'): |
| 1143 | # s = 'Context' if c_cls == C.Context else 'Decimal' |
| 1144 | # print("\n%s %s:\n%s" % (s, key, funcdict[key])) |
| 1145 | |
| 1146 | |
| 1147 | if __name__ == '__main__': |
no test coverage detected
searching dependent graphs…