def checkFilterEvents(src, record, what=NodeFilter.SHOW_ALL): record_options.filter = RecordingFilter() record_options.filter.whatToShow = what dom = expatbuilder.makeBuilder(record_options).parseString(src) if record != record_options.filter.events: print print "Received filter events:" pprint.pprint(record_options.filter.events) print print "Expected filter events:" pprint.pprint(record) dom.unlink()
def checkResult(src): print dom = expatbuilder.makeBuilder(simple_options).parseString(src) print dom.toxml() dom.unlink()