Finish the reversal test.

communication
junos 2021-07-22 15:46:57 +02:00
parent f49a80d5d8
commit ed0b013801
1 changed files with 8 additions and 3 deletions

View File

@ -37,6 +37,11 @@ class EsmFeatures(unittest.TestCase):
def test_reverse_jcq_demand_control_scoring(self): def test_reverse_jcq_demand_control_scoring(self):
esm_reversed = reverse_jcq_demand_control_scoring(self.esm_clean) 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.assertEqual(0, int(self.esm_clean.loc[self.esm_clean["question_id"] == 73, "esm_user_answer_numeric"]))
#self.assertNotIn(0, esm_reversed.loc[esm_reversed["question_id"] == 73, "esm_user_score"]) 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.