def test_jaccard_sim_4(self): lset = {'hello', 'this'} rset = {'hello'} self.assertEqual(db._jaccard_sim(lset, rset), 0.5)
def test_jaccard_sim_2(self): lset = {'hello'} rset = set() self.assertEqual(db._jaccard_sim(lset, rset), 0.0)
def test_jaccard_sim_3(self): lset = set([]) rset = {'hello'} self.assertEqual(db._jaccard_sim(lset, rset), 0.0)
def test_jaccard_sim_1(self): lset = set() rset = set() self.assertEqual(db._jaccard_sim(lset, rset), 0.0)