Add a test for SMS features.
parent
1bc996413e
commit
c88336481e
|
@ -17,11 +17,25 @@ FEATURES_CALLS = (
|
|||
+ ["no_contacts"]
|
||||
)
|
||||
|
||||
# FEATURES_CALLS = ["no_all",
|
||||
# FEATURES_CALLS =
|
||||
# ["no_calls_all",
|
||||
# "no_incoming", "no_outgoing", "no_missed",
|
||||
# "duration_total_incoming", "duration_total_outgoing",
|
||||
# "duration_max_incoming", "duration_max_outgoing",
|
||||
# "no_incoming_ratio", "no_outgoing_ratio"]
|
||||
# "no_incoming_ratio", "no_outgoing_ratio",
|
||||
# "no_contacts"]
|
||||
|
||||
FEATURES_SMS = (
|
||||
["no_sms_all"]
|
||||
+ ["no_" + sms_type for sms_type in sms_types.values()]
|
||||
+ ["no_" + sms_types.get(1) + "_ratio", "no_" + sms_types.get(2) + "_ratio"]
|
||||
+ ["no_contacts"]
|
||||
)
|
||||
# FEATURES_SMS =
|
||||
# ["no_sms_all",
|
||||
# "no_received", "no_sent",
|
||||
# "no_received_ratio", "no_sent_ratio",
|
||||
# "no_contacts"]
|
||||
|
||||
|
||||
def get_call_data(usernames: Collection) -> pd.DataFrame:
|
||||
|
|
|
@ -76,14 +76,13 @@ class CallsFeatures(unittest.TestCase):
|
|||
|
||||
def test_count_comms_calls(self):
|
||||
self.features = count_comms(self.calls)
|
||||
print(self.features)
|
||||
self.assertIsInstance(self.features, pd.DataFrame)
|
||||
self.assertCountEqual(self.features.columns.to_list(), FEATURES_CALLS)
|
||||
|
||||
def test_count_comms_sms(self):
|
||||
self.features = count_comms(self.sms)
|
||||
print(self.features)
|
||||
self.assertIsInstance(self.features, pd.DataFrame)
|
||||
self.assertCountEqual(self.features.columns.to_list(), FEATURES_SMS)
|
||||
|
||||
def test_calls_sms_features(self):
|
||||
self.features_call_sms = calls_sms_features(self.calls, self.sms)
|
||||
|
|
Loading…
Reference in New Issue