[1, 1, (0,), {'__base__': 'd', '__bases__': 'd', '__basicsize__': 'd', '__call__': 'm', '__cmp__': 'm', '__delattr__': 'm', '__dict__': 'd', '__dictoffset__': 'd', '__doc__': 'd', '__flags__': 'd', '__getattribute__': 'm', '__hash__': 'm', '__itemsize__': 'd', '__module__': 'd', '__mro__': 'd', '__name__': 'd', '__new__': 'n', '__repr__': 'm', '__setattr__': 'm', '__subclasses__': 'm', '__weakrefoffset__': 'd', 'mro': 'm'}]] source_version = '2.3.5' if __name__ == '__main__': print 'comparing with information from %s' % source_version import make_checker make_checker.report(*make_checker.do_check(names, checks))
usage() import make_checker ignored_types = ['frame', 'code', 'traceback'] checks = [] for check in checker.checks: index, expected_type, expected_bases, expected_dict = check if checker.names[index] in ignored_types: print 'Skipping', checker.names[index] continue checks.append(check) ignored_members = ['__getattribute__', '__doc__'] ok, missing, bad_type, different = make_checker.do_check(checker.names, checks) def strip_ignored(differences, key, ignored): if not key in differences: return problems = differences[key] for member in ignored_members: if member in problems: problems.remove(member) for t, name, differences in different: strip_ignored(differences, 'missing', ignored_members) strip_ignored(differences, 'extras', ignored_members)
1, 1, (0, ), { '__base__': 'd', '__bases__': 'd', '__basicsize__': 'd', '__call__': 'm', '__cmp__': 'm', '__delattr__': 'm', '__dict__': 'd', '__dictoffset__': 'd', '__doc__': 'd', '__flags__': 'd', '__getattribute__': 'm', '__hash__': 'm', '__itemsize__': 'd', '__module__': 'd', '__mro__': 'd', '__name__': 'd', '__new__': 'n', '__repr__': 'm', '__setattr__': 'm', '__subclasses__': 'm', '__weakrefoffset__': 'd', 'mro': 'm' } ]] source_version = '2.3.5' if __name__ == '__main__': print 'comparing with information from %s' % source_version import make_checker make_checker.report(*make_checker.do_check(names, checks))
ignored_types = ['frame', 'code', 'traceback'] checks = [] for check in checker.checks: index, expected_type, expected_bases, expected_dict = check if checker.names[index] in ignored_types: print 'Skipping', checker.names[index] continue checks.append(check) ignored_members = ['__getattribute__', '__doc__'] ok, missing, bad_type, different = make_checker.do_check(checker.names, checks) def strip_ignored(differences, key, ignored): if not key in differences: return problems = differences[key] for member in ignored_members: if member in problems: problems.remove(member) for t, name, differences in different: strip_ignored(differences, 'missing', ignored_members) strip_ignored(differences, 'extras', ignored_members) make_checker.report(ok, missing, bad_type, different)