예제 #1
0
 def test_list(self):
     self.assertTrue(iterutils.isiterable([]))
예제 #2
0
 def test_none(self):
     self.assertFalse(iterutils.isiterable(None))
예제 #3
0
 def test_generator(self):
     gen = (i for i in range(10))
     self.assertTrue(iterutils.isiterable(gen))
예제 #4
0
 def test_string(self):
     self.assertFalse(iterutils.isiterable('foo'))
예제 #5
0
 def test_dict(self):
     self.assertFalse(iterutils.isiterable({}))