abcclassroom.ok.
OKSuite
Bases: object
object
run
OKSuiteResult
Displayable result from running OKTests
result_template
OKTest
A single DocTest defined by OKPy. Instances of this class are callable. When called, it takes a global_environment dict, and returns a TestResult object. We only take a global_environment, not a local_environment. This makes tests not useful inside functions, methods or other scopes with local variables. This is a limitation of doctest, so we roll with it.
from_file
Parse a ok test file & return an OKTest
result_fail_template
result_pass_template
check
check(‘tests/q1.py’, globals()) Returns a TestResult object.
grade_notebook
run_doctest
Run a single test with given global_environment. Returns (True, ‘’) if the doctest passes. Returns (False, failure_message) if the doctest fails.