Ejemplo n.º 1
0
 def test_dbnone_from_iter(self):
     a = [1]
     self.assertEqual(all_pyobject_from_iter(a, None), False)
Ejemplo n.º 2
0
 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))
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 def test_all_empty_set_from_iter(self):
     s = PyObjectSet_from([])
     a = [1]
     result = all_pyobject_from_iter(a, s)
     self.assertEqual(result, False)
Ejemplo n.º 5
0
 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)