Something
public python v1 · immutableimport doctestopts = doctest.ELLIPSISclass Filter(object): def __init__(self, want): self.want = want def match(self, got): checker = doctest.OutputChecker() return checker.check_output(self.want, got, opts)if __name__ == '__main__': filter = Filter("...boo!...") for test in ["boohoo!", "boo!", "boobooboo!boo", "this is just a boo! fun little idea"]: print test, filter.match(test)