Finish the reversal test.
parent
f49a80d5d8
commit
ed0b013801
|
@ -37,6 +37,11 @@ class EsmFeatures(unittest.TestCase):
|
|||
|
||||
def test_reverse_jcq_demand_control_scoring(self):
|
||||
esm_reversed = reverse_jcq_demand_control_scoring(self.esm_clean)
|
||||
print(esm_reversed.loc[esm_reversed["question_id"] == 73, "esm_user_score"])
|
||||
#self.assertIn(1.0, esm_reversed.loc[esm_reversed["question_id"] == 73, "esm_user_score"])
|
||||
#self.assertNotIn(0, esm_reversed.loc[esm_reversed["question_id"] == 73, "esm_user_score"])
|
||||
|
||||
self.assertEqual(0, int(self.esm_clean.loc[self.esm_clean["question_id"] == 73, "esm_user_answer_numeric"]))
|
||||
self.assertEqual(1, int(esm_reversed.loc[esm_reversed["question_id"] == 73, "esm_user_score"]))
|
||||
# An example of a regular item: the score gets incremented by 1, to shift to 1-4 scoring.
|
||||
|
||||
self.assertEqual(0, int(self.esm_clean.loc[self.esm_clean["question_id"] == 79, "esm_user_answer_numeric"]))
|
||||
self.assertEqual(4, int(esm_reversed.loc[esm_reversed["question_id"] == 79, "esm_user_score"]))
|
||||
# An example of a reversed item.
|
||||
|
|
Loading…
Reference in New Issue