testcases.py File

  • This file contains two dictionaries.

  1. TEST_SCORE {} Sets the partial scores for each test case, which are configured in the sketch_unittest.cc file.

# Example: Setting partial scores for 3 test cases
TEST_SCORE = {
    'quiz1': 33,
    'quiz2': 33,
    'quiz3': 34
}
  1. MESSAGE {} Sets the guidance message for each test case, including grading criteria.

ℹ️ We recommend writing clear and concise guidance messages that accurately represent the grading criteria.

# Example: Setting guidance messages for 3 test cases
MESSAGE = {
    'quiz1': 'Did you set the pins for the RGB LED and ultrasonic sensor correctly? ',
    'quiz2': 'When the measured distance is less than or equal to 17cm, did the RGB LED blink in red? ',
    'quiz3': 'When the measured distance exceeds 17cm, did the RGB LED blink in blue? '
}

  • As shown in the example below, the partial scores and guidance messages set in this file can be viewed in the Elice platform terminal when the [Submit] button is clicked.

Last updated