Skip to content

Hiding correct answers in tests

To prevent learners from guessing the correct input or adjusting their code without understanding, you can configure exercise tests to show only whether the learner has passed or failed. The correct answers will not be displayed in this case.

To hide the correct answers when running tests for an exercise:

  1. Open CODE > exercises > {the exercise you need}.
  2. Click exercise-config.json and in the editor pane add the "masked-test" parameter for the respective test files.

Example

{

"files": {

"masked-test": [

"leap_masked_tests.py"

]

}

}