Test should be OK

Test should be OK

von philippe juhel -
Anzahl Antworten: 1

Hi,

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 :

test


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,


Philippe


Als Antwort auf philippe juhel

Re: Test should be OK

von Richard Lobb -

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.

Richard