def test_generalized_dice_1(self): self.assertAlmostEqual(generalized_dice(["levenshtein","leuwenhstijn","leuvenstein"]), 0.529, 3)
def test_generalized_dice_identity(self): self.assertEqual(generalized_dice(["a","a","a","a"]), 1.0)
def test_generalized_dice_symmetry(self): self.assertEqual(generalized_dice(["ab","bc","bd"]), generalized_dice(["bd", "bc","ab"]))
def test_generalized_dice_empty_3(self): self.assertEqual(generalized_dice(["","","","a"]), 0.0)
def test_generalized_dice_1(self): self.assertAlmostEqual( generalized_dice(["levenshtein", "leuwenhstijn", "leuvenstein"]), 0.529, 3)
def test_generalized_dice_symmetry(self): self.assertEqual(generalized_dice(["ab", "bc", "bd"]), generalized_dice(["bd", "bc", "ab"]))
def test_generalized_dice_identity(self): self.assertEqual(generalized_dice(["a", "a", "a", "a"]), 1.0)
def test_generalized_dice_empty_3(self): self.assertEqual(generalized_dice(["", "", "", "a"]), 0.0)