Closed filipsch closed 6 years ago
this may be more of a sqlbackend issue--we can catch if there are blanks as in rbackend
Just a note--sqlwhat's fallback strategy is that if an AST can't be parsed, then it can only check the result or use test_student_typed.
Hmm, the AST does seem to be parsing okay, for example this exercise shown on sqlwhat here.
As far as I know, I can't use check_result()
with these because they're also also using use_isql=True
.
Here's a cropped version of the code, where It's a bit easier to see the parse error. The red dot in the parser graph indicates an error, it was a bit tucked away in the full code.
edit:
The isql part is a bit tough, since that means we can only use test_student_typed, when there's a parser error. I'll look into setting the exercise to fail whenever isql returns an error.
Ah, sorry - thanks!
Related, I was thinking it would be cool if one could do something like test_student_did_not_type()
then you could just check if there's any blanks in the submission that way.
@colinricardo, can you raise that in another issue, with an example that illustrates? Thanks!
@filipsch sure thing.
@machow is there any update on setting the exercise to fail whenever isql returns an error?
@colinricardo not currently, we could probably just search for the error message and add an option that way. I'll open an issue.
This has been resolved through switching from isql to sqlcmd, and implementing the test_not
functionality in protowhat
(which can be used by sqlwhat
).
Raised by @colinricardo in https://github.com/datacamp/courses-msft-transact-sql/issues/49#issuecomment-302792248
See screencast: https://v.usetapes.com/WayrkiARsE
Basically, adding blanks can have the exercise pass the SCT.