()
| 86 | |
| 87 | |
| 88 | def prep_context(): |
| 89 | cntxt = {"success_msg": success_msg} |
| 90 | from pythonwhat.sct_syntax import v2_check_functions |
| 91 | from pythonwhat.probe import build_probe_context |
| 92 | |
| 93 | imports = [ |
| 94 | "from inspect import Parameter as param", |
| 95 | "from pythonwhat.signatures import sig_from_params, sig_from_obj", |
| 96 | "from pythonwhat.State import set_converter", |
| 97 | "from pythonwhat.sct_syntax import F, Ex" |
| 98 | ] |
| 99 | [exec(line, None, cntxt) for line in imports] |
| 100 | |
| 101 | # only if PYTHONWHAT_V2_ONLY is not set, support v1 |
| 102 | if include_v1(): |
| 103 | tree, probe_cntxt = build_probe_context() |
| 104 | cntxt.update(probe_cntxt) |
| 105 | else: |
| 106 | tree = None |
| 107 | |
| 108 | cntxt.update(v2_check_functions) |
| 109 | # TODO: ChainStart instances cause errors when dill tries to pass manual converter functions |
| 110 | # cntxt.update(get_chains()) |
| 111 | return tree, cntxt |
| 112 | |
| 113 | |
| 114 | def setup_state(stu_code="", sol_code="", pec="", **kwargs): |
no test coverage detected