microbit = codesters.Microbit()
microbit.show_string("hello")
t = codesters.Teacher()
get_temps = t.find_function("get_temp")
try:
tval1 = get_temps[0][1].replace(" ", "")
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 != "DNE", "Great job!")
t1.add_failure(tval1 == "DNE", "Did you drag in Temperature?")
t2 = TestObjective()
t2.add_success("data=" in tval1, "Great job!")
t2.add_failure("temp=" in tval1, "Did you change the variable name from temp to data?")
t2.add_failure(tval1 == "DNE", "Did you drag in Temperature?")
tester = TestManager()
tester.add_test_list([t1, t2])
tester.run_tests()
tester.display_first_feedback()