Mike
try docker
c6d7c4c
raw
history blame
2.36 kB
.Checks: &Checks
one_argument:
assert: "len(f.args)"
eq: 1
returns_list:
assert: "isinstance(f.call(0),list)"
eq: true
value_1:
assert: "f.call(1)"
eq: [0]
value_2:
assert: "f.call(2)"
eq: [0, 1]
value_3:
assert: "f.call(3)"
eq: [0, 1, 1]
value_5:
assert: "f.call(5)"
eq: [0, 1, 1, 2, 3]
FibonacciZeroShot:
Signature: "fib(n)"
Input: "with input element number n (0 based)"
Output: "the n-th element of the fibbonaci sequence"
Fact: "The fibonnaci sequence is defined by the boundary conditions fib(0) == 0, fib(1) == 1 and the recursive relation fib(n) == fib(n-1) + fib(n-2)"
Description: "See if the model can produce a well known sequence"
Checks:
one_argument:
assert: "len(f.args)"
eq: 1
input_name:
assert: "f.args[0].name"
eq: "n"
value_0:
assert: "f.call(0)"
eq: 0
value_1:
assert: "f.call(1)"
eq: 1
value_2:
assert: "f.call(2)"
eq: 1
value_3:
assert: "f.call(3)"
eq: 2
value_5:
assert: "f.call(5)"
eq: 5
FibonacciListZeroShot:
Signature: "fib(n)"
Input: "with input length n"
Output: "a list with the first n elements of the fibbonaci sequence"
Fact: "The fibonnaci sequence is defined by the boundary conditions fib(0) == 0, fib(1) == 1 and the recursive relation fib(n) == fib(n-1) + fib(n-2)"
Description: "See if the model can produce a well known sequence, explicitly asking for a list"
Checks:
<<: *Checks
input_name:
assert: "f.args[0].name"
eq: "n"
FibonacciMisnamed:
Signature: "glork(bork)"
Input: "with input length bork"
Output: "a list with the first bork elements of the fibbonaci sequence"
Fact: "The fibonnaci sequence is defined by the boundary conditions fib(0) == 0, fib(1) == 1 and the recursive relation fib(n) == fib(n-1) + fib(n-2)"
Description: "See if the model can produce a well known sequence if the name has been changed"
Checks:
<<: *Checks
input_name:
assert: "f.args[0].name"
eq: "bork"
func_name:
assert: "f.name"
eq: "glork"