def test_FC_random(self): m = randint(50, 999) n = randint(1, m) hash_table = [-1] * hash_len for i in range(n): hash_table[i] = 1 self.assertEqual(n / m, Tarea4.FC(hash_table, m))
def test_FC_full(self): hash_table = [1] * hash_len self.assertEqual(1, Tarea4.FC(hash_table, hash_len))
def test_FC_empty(self): hash_table = [-1] * hash_len self.assertEqual(0, Tarea4.FC(hash_table, hash_len))