Closed colinricardo closed 7 years ago
This was already discussed when testing the microsoft sql course, and it was decided to remove test_ncols from check_result.
We can't keep putting things into a simple, high level SCT and then removing it due to the whims of single course needs. @filipsch and I worked out a simple mechanism that will let you specify an SCT function at the course level, and then you can put whatever you want in it. It's already implemented, just needs to be put into production--I'll do it when we work on SCT stuff this week.
(This way, individual courses can have the behavior you're asking for, and then if they all end up using that behavior, we can pull it into sqlwhat)
Reviewed https://github.com/datacamp/sqlwhat-ext with @colinricardo , which includes this behavior (long live check_result2!).
Overview
Currently
check_result()
will pass if the columns in the student submission are some superset of the columns in the solution.This means that
will pass, when the desired solution is:
Enhancement Request
Adding
test_ncols()
tocheck_result()
so the number of columns in student submission must match the number of columns in the solution code. I would argue that this is desirable default behavior, but it's up for discussion: cc @ncarchedi