Example #1
0
 def test_length(self):
     self.assertEqual(len(next(random_stories_generator(self.story))), 5)
     self.assertEqual(
         len(next(random_stories_generator(self.story, length=3))), 3)
     self.assertEqual(
         len(next(random_stories_generator(self.story, length=6))), 6)
     self.assertEqual(len(next(random_stories_generator([]))), 0)
Example #2
0
 def test_number(self):
     self.assertEqual(len(list(random_stories_generator(self.story, number=10))), 10)
Example #3
0
 def test_length(self):
     self.assertEqual(len(next(random_stories_generator(self.story))), 5)
     self.assertEqual(len(next(random_stories_generator(self.story, length=3))), 3)
     self.assertEqual(len(next(random_stories_generator(self.story, length=6))), 6)
     self.assertEqual(len(next(random_stories_generator([]))), 0)
Example #4
0
 def test_number(self):
     self.assertEqual(
         len(list(random_stories_generator(self.story, number=10))), 10)