def test_contains(self):
    c = Collection([1, 3, 5])
    self.assertTrue(c.contains(1))
    self.assertFalse(c.contains(2))
    self.assertTrue(c.contains((lambda x: (x < 5))))
    self.assertFalse(c.contains((lambda x: (x > 5))))
    self.assertIn(3, c)
    c = Collection([{'v': 1}, {'v': 3}, {'v': 5}])
    self.assertTrue(c.contains('v', 1))
    self.assertFalse(c.contains('v', 2))
    obj1 = type('lamdbaobject', (object,), {})()
    obj1.v = 1
    obj2 = type('lamdbaobject', (object,), {})()
    obj2.v = 3
    obj3 = type('lamdbaobject', (object,), {})()
    obj3.v = 5
    c = Collection([{'v': 1}, {'v': 3}, {'v': 5}])
    self.assertTrue(c.contains('v', 1))
    self.assertFalse(c.contains('v', 2))
def test_contains(self):
    c = Collection([1, 3, 5])
    self.assertTrue(c.contains(1))
    self.assertFalse(c.contains(2))
    self.assertTrue(c.contains((lambda x: (x < 5))))
    self.assertFalse(c.contains((lambda x: (x > 5))))
    self.assertIn(3, c)
    c = Collection([{'v': 1}, {'v': 3}, {'v': 5}])
    self.assertTrue(c.contains('v', 1))
    self.assertFalse(c.contains('v', 2))
    obj1 = type('lamdbaobject', (object,), {})()
    obj1.v = 1
    obj2 = type('lamdbaobject', (object,), {})()
    obj2.v = 3
    obj3 = type('lamdbaobject', (object,), {})()
    obj3.v = 5
    c = Collection([{'v': 1}, {'v': 3}, {'v': 5}])
    self.assertTrue(c.contains('v', 1))
    self.assertFalse(c.contains('v', 2))