def test_Pass(self):
self.data["DC_SCT"] = '''
# Test: Predefined code
predef_msg = "You don't have to change any of the predefined code."
test_object("file", undefined_msg = predef_msg, incorrect_msg = predef_msg)
# [6-21-2016: UPDATED WITH FIX]
# Test: call to np.genfromtxt() and 'data' variable
test_object("data", do_eval = False)
test_function(
"numpy.genfromtxt",
not_called_msg = "Make sure you call `np.genfromtxt()`.",
incorrect_msg = "Did you pass the correct arguments to `np.genfromtxt()`?")
# [6-21-2016: NEEDS FIX]
# Test: Predefined code
test_function("type", do_eval = False, not_called_msg = "error in type", incorrect_msg = "error in type")
test_function("print", not_called_msg = predef_msg, incorrect_msg = predef_msg)
# [6-21-2016: UPDATED WITH FIX]
# Test: call to np.recfromcsv() and 'd' variable
test_object("d", do_eval = False)
test_function(
"numpy.recfromcsv",
not_called_msg = "Make sure you call `np.recfromcsv()`.",
incorrect_msg = "Did you pass the correct arguments to `np.recfromcsv()`?")
# Test: Predefined code
test_function("print", index = 2, incorrect_msg = "error is in print2")
success_msg("Good job!")
'''
sct_payload = helper.run(self.data)
self.assertTrue(sct_payload['correct'])
评论列表
文章目录