diff --git a/unitgrade/unitgrade_helpers.py b/unitgrade/unitgrade_helpers.py index e336a3a571bcd0555d30ceb589664e199a962fc0..c19e5cc29ef00493e10a5c25e5a85832a6e364ff 100644 --- a/unitgrade/unitgrade_helpers.py +++ b/unitgrade/unitgrade_helpers.py @@ -130,11 +130,11 @@ def evaluate_report(report, question=None, qitem=None, passall=False, verbose=Fa if not hidden: print(ss, end="") sys.stdout.flush() - from timeit import timeit - timeit() + import time + start = time.time() (current, possible) = item.get_points(show_expected=show_expected, show_computed=show_computed,unmute=unmute, passall=passall) q_[j] = {'w': iw, 'possible': possible, 'obtained': current, 'hidden': hidden, 'computed': str(item._computed_answer)} - tsecs = np.round(timeit(), 2) + tsecs = np.round(time.time-start, 2) # q.possible += possible * iw # q.obtained += current * iw @@ -144,7 +144,7 @@ def evaluate_report(report, question=None, qitem=None, passall=False, verbose=Fa print(ss) ws, possible, obtained = upack(q_) - possible = int(ws @ possible) + possible = int(ws @ possible) obtained = int(ws @ obtained) obtained = int(myround(int((w * obtained) / possible ))) if possible > 0 else 0 score[n] = {'w': w, 'possible': w, 'obtained': obtained, 'items': q_, 'hidden': q_hidden}