pythonwhat
pythonwhat copied to clipboard
requires_ast decorator for SCTs, as in protowhat
with the addition of check_file
, pythonwhat can create a state for a file that is not python code. In this case, the ast tree (state.student_tree) will be None. if someone tries to use check_node
etc.. it will fail the SCT.
However, we either want to...
- skip these SCTs when the ast is None (as in protowhat). This would allow for custom ast parsers depending on file type, and for them to fail gracefully
- to throw an error for developers, saying they can't use these SCTs without an AST.