Question Authors' Forum

Test should be OK

Picture of philippe juhel
Test should be OK
by philippe juhel - Wednesday, 16 March 2016, 10:13 PM


I have a question where I ask to write a Vector2D class with a method to multiply a vector by a scalar.

In the test, there're two test cases :


When I test this question, I put a code which doesn't contain the multScalaire method but the constructor and the method are OK (see below)response

Why the first test is false? It should be OK because only the multScalaire method is missing, all the other code is OK.

Best regards,


Picture of Richard Lobb
Re: Test should be OK
by Richard Lobb - Thursday, 17 March 2016, 7:58 AM

Hi Philippe

I think you must have a broken template or question type. Your question works fine with the built-in Python3 question type.

Your result table has no 'Got' column, which means there was no output from either test, which suggests to me that the actual test code is not being included in the run.

The way to debug weird problems like this is to turn on Template Debugging. That will show you exactly what programs are being run. In this case there should be 3 runs: a combinator template run, which will fail with a runtime error because of the second test, followed by two per-test-case combinator template runs yielding a correct answer for the first test but a runtime error for the second.