Checking students’ code with edutest
¶
edutest
is a Python utility library for writing tests in the context of teaching programming. It can be used in any testing framework.
Related project
If you need to check students’ work in VPL, then you may want to use edutest
together with vpltest.
Contents:
Getting edutest¶
Just do
pip install edutest
NB! If you have several Python versions installed then make sure you’re using correct pip.
Note
If you can’t or don’t want to use pip, then download zip file from https://pypi.python.org/pypi/edutest and extract folder edutest
somewhere in your Python path.
If you need latest source, then go to https://bitbucket.org/plas/edutest.
API reference¶
-
edutest.
check_function
(name_or_object, arguments=[], kw_args={}, expected_result=None, inputs=[], expected_output='')[source]¶
-
edutest.
import_module
(name, package=None)[source]¶ Works like
importlib.import_module()
but throws error instead of blocking when module tries to read from stdin.