I want to be able to generate tests that take a variable defined in a file and pass these to an (arbitrary) function that I define in generate.yml and then compare the output to a reference given in the generate.yml.
Something like "provide indices a and b so that you can extract the list ["fee"] from ["foo", "fee", "fum"]".
- get
a and b from student work (eg a=1, b=2)
- define
lambda a, b: ["foo", "fee", "fum"][a:b]
- compare to desired output (e.g.
["fee"])
See
I want to be able to generate tests that take a variable defined in a file and pass these to an (arbitrary) function that I define in generate.yml and then compare the output to a reference given in the generate.yml.
Something like "provide indices a and b so that you can extract the list ["fee"] from ["foo", "fee", "fum"]".
aandbfrom student work (eg a=1, b=2)lambda a, b: ["foo", "fee", "fum"][a:b]["fee"])See