class ZIPCode:
def __init__(self, zip):
self._zip = zip
self.checkRep()
def zip(self):
return self._zip()
def checkRep(self):
assert len(self.zip()) == 5
for i in range(0, 5):
assert '0' <= self.zip()[i] <= '9'
import re
def test(s):
if re.search("
import random
def fuzzer():
string_length = int(random.random() * 1024)
out = ""
for i in range(0, string_length):
c = chr(int(random.random() * 96 + 32))
out = out + c
return out
print fuzzer()
patches = [1, 2, 3, 4, 5, 6, 7, 8]
def test(s):
print repr(s), len(s),
if 3 in s and 6 in s:
print "FAIL"
return "FAIL"
else:
print "PASS"
return "PASS"
print ddmin(patches, test)