Commits

Greg Malcolm  committed 2c06f3b

Got rid of a confusing Generator test

  • Participants
  • Parent commits 0cc3969

Comments (0)

Files changed (2)

File python 2/koans/about_generators.py

         self.assertEqual(2, num_list[0])
         
         # A generator has to be iterated through.
-        self.assertRaises(___, num_generator[0]) # Evaluates num_generator[0]
-        self.assertEqual(__, list(num_generator)[0]) # This works though
+        self.assertEqual(__, list(num_generator)[0])
         
         # Both list comprehensions and generators can be iterated
         # though. However, a generator function is only called on the

File python 3/koans/about_generators.py

         # A generator has to be iterated through.
         with self.assertRaises(___): num = num_generator[0]
         
-        self.assertEqual(__, list(num_generator)[0]) # This works though
+        self.assertEqual(__, list(num_generator)[0])
         
         # Both list comprehensions and generators can be iterated though. However, a generator
         # function is only called on the first iteration. The values are generated on the fly