def exactChange9999(test): test.test = lambda: assertlib.numberOnLine( 39996, lib.getLine(lib.outputOf(_fileName, [9999]), 0)) test.description = lambda: "9999$ in change equals 39996 coins"
def exactWater10(test): test.test = lambda: assertlib.numberOnLine( 120, lib.getLine(lib.outputOf(_fileName, stdinArgs=[10]), 0)) test.description = lambda: "10 minutes in the shower is 120 bottles of water"
def exactWater327(test): test.test = lambda: assertlib.numberOnLine( 3924, lib.getLine(lib.outputOf(_fileName, stdinArgs=[327]), 0)) test.description = lambda: "327 minutes equals 3924 water bottles"
def exactZeroPoint(test): test.test = lambda : assertlib.numberOnLine(0.37, lib.getLine(lib.outputOf(_fileName), 0), deviation = 0.01)\ and assertlib.numberOnLine(0.69, lib.getLine(lib.outputOf(_fileName), 0), deviation = 0.01) test.description = lambda: "prints the intersects of the axes (x = 0.37 and y = 0.69)"
def correctSpeed(test): test.test = lambda: assertlib.numberOnLine( 159.5, lib.getLine(lib.outputOf(_fileName), 1), deviation=0.1) test.description = lambda: "prints the speed with which the apple touches the ground"
def correctAmount(test): test.test = lambda: assertlib.numberOnLine( math.e, lib.getLine(lib.outputOf(_fileName), 0), deviation=0.0027) test.description = lambda: "Geeft de correcte gemiddeld aantal worpen"
def correctTimeTillReturn(test): test.test = lambda : assertlib.numberOnLine(5061, lib.getLine(lib.outputOf(_fileName), 1), deviation = 50) test.description = lambda : "prints the number of seconds elapsed upon return"
def correctTimeTillReturn(test): test.test = lambda: assertlib.numberOnLine( 5061, lib.getLine(lib.outputOf(_fileName), 1), deviation=50) test.description = lambda: "print het tijdstip van terugkeer na loslaten"
def correctDistance(test): test.test = lambda: assertlib.numberOnLine( 35, lib.getLine(lib.outputOf(_fileName), 1)) test.fail = lambda info: "is it printed on a separate second line?" test.description = lambda: "prints the correct length of the sequence"
def exactChange0(test): test.test = lambda: assertlib.numberOnLine( 0, lib.getLine(lib.outputOf(_fileName, [0]), 0)) test.description = lambda: "0$ in change equals 0 coins"
def correctMaxSpeed(test): test.test = lambda: assertlib.numberOnLine( 28474.32, lib.getLine(lib.outputOf(_fileName), 0), deviation=500) test.description = lambda: "print de maximale snelheid van de appel"
def handlesWrongInput(test): test.test = lambda: assertlib.numberOnLine( 0, lib.getLine(lib.outputOf(_fileName, [-9.50, -327, 0]), 0)) test.description = lambda: "is able to deal with the following erroneous input: -9.50 and -327"
def exactChange35(test): test.test = lambda: assertlib.numberOnLine( 2, lib.getLine(lib.outputOf(_fileName, [0.35]), 0)) test.description = lambda: "0.35$ in change equals 2 coins"
def exactChange402(test): test.test = lambda: assertlib.numberOnLine( 18, lib.getLine(lib.outputOf(_fileName, [4.02]), 0)) test.description = lambda: "4.02$ in change equals 18 coins"
def handlesWrongInput(test): test.test = lambda : assertlib.numberOnLine(2, lib.getLine(lib.outputOf(_fileName, [-90, -1, 0, 1]), 0)) test.description = lambda : "handelt foute input af: -90, -1, 0"
def correctBelow40(test): tsts = ['40', 'veertig', 'forty'] test.test = lambda : (assertlib.numberOnLine(5, lib.getLine(lib.outputOf(_fileName), 0), deviation = 5) or assertlib.numberOnLine(0.05, lib.getLine(lib.outputOf(_fileName), 0), deviation = 0.05)) and sum([assertlib.contains(lib.outputOf(_fileName), tst) for tst in tsts]) test.fail = lambda info : "make sure you output a sentence containing the answer on the first line of output" test.description = lambda : "prints, on the first line, how often the sum is less than 40"
def exact1(test): test.test = lambda : assertlib.numberOnLine(2, lib.getLine(lib.outputOf(_fileName, [1]), 0)) test.description = lambda : "vind het 1ste priemgetal: 2"
def correctAbove60(test): tsts = ['60', 'zestig', 'sixty'] test.test = lambda : (assertlib.numberOnLine(5, lib.getLine(lib.outputOf(_fileName), 1), deviation = 5) or assertlib.numberOnLine(0.05, lib.getLine(lib.outputOf(_fileName), 1), deviation = 0.05))and sum([assertlib.contains(lib.outputOf(_fileName), tst) for tst in tsts]) test.fail = lambda info : "make sure you output a sentence containing the answer on the second line of output" test.description = lambda : "prints, on the first line, how often the sum is more than 60"
def correctMaxSpeed(test): test.test = lambda : assertlib.numberOnLine(28474.32, lib.getLine(lib.outputOf(_fileName), 0), deviation = 500) test.description = lambda : "prints the maximum speed reached by the apple"
def exactChange16(test): test.test = lambda: assertlib.numberOnLine( 7, lib.getLine(lib.outputOf(_fileName, stdinArgs=[1.6]), 0)) test.description = lambda: "input of 1.6 yields output of 7"
def correctDistance(test): test.test = lambda: assertlib.numberOnLine( 35, lib.getLine(lib.outputOf(_fileName), 1)) test.description = lambda: "geeft de correcte lengte van de reeks"
def exactChange420(test): test.test = lambda: assertlib.numberOnLine( 18, lib.getLine(lib.outputOf(_fileName, stdinArgs=[4.2]), 0)) test.description = lambda: "input of 4.2 yields output of 18" test.fail = lambda info: "did you forget to round your input to the nearest cent?"
def correctTime(test): test.test = lambda: assertlib.numberOnLine( 4.51, lib.getLine(lib.outputOf(_fileName), 0), deviation=0.01) test.description = lambda: "prints the number of seconds after which the apple touches the ground"
def exactChange0(test): test.test = lambda: assertlib.numberOnLine( 0, lib.getLine(lib.outputOf(_fileName, stdinArgs=[0]), 0)) test.description = lambda: "input of 0 yields output of 0"
def correctSecondsToHit100(test): test.test = lambda: assertlib.numberOnLine( 2.83, lib.getLine(lib.outputOf(_fileName), 2), deviation=0.01) test.description = lambda: "prints the number of seconds after which the speed reaches 100 km/h"
def exact1000(test): test.test = lambda : assertlib.numberOnLine(7919, lib.getLine(lib.outputOf(_fileName, [1000]), 0)) test.description = lambda : "vind het 1000ste priemgetal: 7919"
def exactWater327(test): test.test = lambda: assertlib.numberOnLine( 3924, lib.getLine(lib.outputOf(_fileName, stdinArgs=[327]), 0)) test.description = lambda: "0 minutes in the shower is 3924 bottles of water"
def exact377(test): test.test = lambda : assertlib.numberOnLine(2591, lib.getLine(lib.outputOf(_fileName, [377]), 0)) test.description = lambda : "vind het 377ste priemgetal: 2591"
def exactWater0(test): test.test = lambda: assertlib.numberOnLine( 0, lib.getLine(lib.outputOf(_fileName, stdinArgs=[0]), 0)) test.description = lambda: "0 minutes equals 0 water bottles"
def exactChange41(test): test.test = lambda: assertlib.numberOnLine( 4, lib.getLine(lib.outputOf(_fileName, [0.41]), 0)) test.description = lambda: "0.41$ in change equals 4 coins"