Home | History | Annotate | Download | only in test

Lines Matching refs:countOf

671     # Test iterators with operator.countOf (PySequence_Count).
673 from operator import countOf
674 self.assertEqual(countOf([1,2,2,3,2,5], 2), 3)
675 self.assertEqual(countOf((1,2,2,3,2,5), 2), 3)
676 self.assertEqual(countOf("122325", "2"), 3)
677 self.assertEqual(countOf("122325", "6"), 0)
679 self.assertRaises(TypeError, countOf, 42, 1)
680 self.assertRaises(TypeError, countOf, countOf, countOf)
684 self.assertEqual(countOf(d, k), 1)
685 self.assertEqual(countOf(d.values(), 3), 3)
686 self.assertEqual(countOf(d.values(), 2j), 1)
687 self.assertEqual(countOf(d.values(), 1j), 0)
698 self.assertEqual(countOf(f, letter + "\n"), count)