def test_dbnone_from_iter(self): a = [1] self.assertEqual(all_pyobject_from_iter(a, None), False)
def test_noniter_from_iter(self): s = PyObjectSet_from([]) a = 1 with pytest.raises(TypeError) as context: all_pyobject_from_iter(a, s) self.assertTrue("object is not iterable" in str(context.value))
def test_all_last_no_from_iter(self): s = PyObjectSet_from([2, 4, 666]) a = [2, 4, 666] * 6 + [3] result = all_pyobject_from_iter(a, s) self.assertEqual(result, False)
def test_all_empty_set_from_iter(self): s = PyObjectSet_from([]) a = [1] result = all_pyobject_from_iter(a, s) self.assertEqual(result, False)
def test_all_from_iter(self): s = PyObjectSet_from([2, 4, 666]) a = [2, 4, 666] * 6 result = all_pyobject_from_iter(a, s) self.assertEqual(result, True)