本文整理汇总了Python中session.Session.x_log方法的典型用法代码示例。如果您正苦于以下问题:Python Session.x_log方法的具体用法?Python Session.x_log怎么用?Python Session.x_log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类session.Session
的用法示例。
在下文中一共展示了Session.x_log方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Session
# 需要导入模块: from session import Session [as 别名]
# 或者: from session.Session import x_log [as 别名]
import main #student solution to the hw
import TA_main #ta's solution to the hw
from session import Session #import the session object
MAX_SCORE = 100
sess = Session(TA_main, main)
sess.set_max_score(MAX_SCORE)
basic_compare = sess.compare()
if basic_compare:
sess.set_score(50)
sess.test_hw_function('count', [0, -5, 10], [-1, 2, 7])
sqInt = main.SquareInt(4)
ta_sqInt = TA_main.SquareInt(4)
ta_sqit = ta_sqInt.square()
hw_sqit = sqInt.square()
if ta_sqit == hw_sqit:
sess.x_log("PASSED Public Test: squareInt(4).square()")
sess.set_score(80)
sess.update_score(10)
else:
sess.x_log("ERROR: your function/class names did not match up with those provided in the solution key. please look over your work and resubmit")
final = sess.finalize()
示例2: Session
# 需要导入模块: from session import Session [as 别名]
# 或者: from session.Session import x_log [as 别名]
import main #student solution to the hw
import TA_main #ta's solution to the hw
from session import Session #import the session object
sess = Session(TA_main, main)
# main_proxy = sess.get_module_proxy()
basic_compare = sess.compare()
if basic_compare:
sess.score_key('basic_compare', 20)
test_count = main.count(5)
# test_count = main_proxy.count(5)
TA_COUNT = TA_main.count(5)
if test_count == TA_COUNT:
sess.i_log('test_count(5)', "PASSED")
sess.i_log('test_count(5)', "booyah")
sess.score_key('testcount5', 5)
sess.test_hw_function('count', [0, -5, 10], [-1, 2.5, 7])
# sqInt_test = main_proxy.SquareInt(4)
# sqit = sqInt_test.square()
else:
sess.x_log("WHOOPS", "ERROR: your function/class names did not match up with those provided in the solution key. please look over your work and resubmit")
final = sess.finalize()