You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure this is possible unless you somehow check the code for occurrences of while and for since I believe you can re-write any use of map(func, iter) or filter(func, iter) as:
This is used to teach an introductory programming course to first year college students. The code in submission/template.py is the initial code that is shown to the students. That file is then overwritten with the student's code.
The entire package is sent to the code evaluator, which runs make test, generating an xml file with the unit test report, which is then sent back to the app for parsing and display.
The samples here are examples to help the teaching assistants write tests which check for the correctness of the student's code and ensure they fulfill the lesson objectives.
It's fine to write a test that opens the file and checks the code, or perhaps override the build in map function and check that it gets called. The idea is to ensure that the student also fulfills the lesson objective of learning map and filter instead of just writing code that produces the desired data structure.
Some exercises are meant to teach students how to use functions like
map
andfilter
.Write a test that passes when those functions are used and fails if loops are used.
The text was updated successfully, but these errors were encountered: