MCPcopy Create free account
hub / github.com/ActiveState/code / _test

Function _test

recipes/Python/299133_bubblebabble/recipe-299133.py:57–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 return "".join([chr(eval("0x%s" % s[i:i+2])) for i in range(0, len(s), 2)])
56
57def _test():
58 tests = """432cc46b5c67c9adaabdcc6c69e23d6d xibod-sycik-rilak-lydap-tipur-tifyk-sipuv-dazok-tixox
595a1edbe07020525fd28cba1ea3b76694 xikic-vikyv-besed-begyh-zagim-sevic-vomer-lunon-gexex
601c453603cdc914c1f2eeb1abddae2e03 xelag-hatyb-fafes-nehys-cysyv-vasop-rylop-vorab-fuxux
61df8ec33d78ae78280e10873f5e58d5ad xulom-vebyf-tevyp-vevid-mufic-bucef-zylyh-mehyp-tuxax
6202b682a73739a9fb062370eaa8bcaec9 xebir-kybyp-latif-napoz-ricid-fusiv-popir-soras-nixyx"""
63 # ...as computed by perl
64
65 tests = [x.split()[:2] for x in tests.split("\n")]
66 for digest, expected in tests:
67 res=bubblebabble(hexstring2string(digest))
68 print digest, res, ("failure", "ok")[expected==res]
69
70
71if __name__=="__main__":

Callers 1

recipe-299133.pyFile · 0.70

Calls 3

bubblebabbleFunction · 0.85
hexstring2stringFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected