Ejemplo n.º 1
0
 def testMethod():
     throw = lib.getFunction("throw", test.fileName)
     return asserts.containsOnly([throw() for i in range(10000)],
                                 list(range(2, 13)))
Ejemplo n.º 2
0
 def testMethod():
     kill = lib.getFunction("kill", _fileName)
     viruses = ["GGGG", "AAAA", "TTTT", "GGGG", "ATGC"] * 1000
     return asserts.containsOnly(
         kill(viruses,
              0.25), viruses) and len(kill(viruses, 0.25)) < len(viruses)
Ejemplo n.º 3
0
 def testMethod():
     mutate = lib.getFunction("mutate", _fileName)
     viruses = ["GGGG", "AAAA", "TTTT", "GGGG", "ATGC"] * 100
     pairs = "".join([mutate(v) for v in viruses])
     return asserts.containsOnly(pairs, "AGTC")
Ejemplo n.º 4
0
 def testMethod():
     generateVirus = lib.getFunction("generateVirus", _fileName)
     pairs = "".join([generateVirus(10) for _ in range(1000)])
     return asserts.containsOnly(pairs, "AGTC")
Ejemplo n.º 5
0
 def testMethod():
     simulate = lib.getFunction("simulate", _fileName)
     viruses = ["GGGG", "AAAA", "TTTT", "GGGG", "ATGC"] * 20
     return asserts.containsOnly(simulate(viruses, 0, 0, 0, 100, 500),
                                 [100])
Ejemplo n.º 6
0
 def testMethod():
     import monopoly
     possession = lib.getFunction("possession", _fileName)
     return asserts.containsOnly(
         possession(monopoly.Board()).values(), [False])