e209be9e211c — Greg Malcolm 13 years ago
From icmurry, github: Added another test to the AboutGenerators koan.

    Demonstrates that next(generator) is exactly equivelant to
    generator.send(None)
2 files changed, 15 insertions(+), 1 deletions(-)

M python 2/koans/about_generators.py
M python 3/koans/about_generators.py
M python 2/koans/about_generators.py +7 -0
@@ 123,4 123,11 @@ class AboutGenerators(Koan):
         next(generator2)
         self.assertEqual(__, next(generator2))
 
+    def test_send_none_is_equivelant_to_next(self):
+        generator = self.yield_tester()
+        
+        next(generator)
+        # 'next(generator)' is exactly equivelant to 'generator.send(None)'
+        self.assertEqual(__, generator.send(None))
+
  

          
M python 3/koans/about_generators.py +8 -1
@@ 126,4 126,11 @@ class AboutGenerators(Koan):
         next(generator2)
         self.assertEqual(__, next(generator2))
 
- 
  No newline at end of file
+    def test_send_none_is_equivelant_to_next(self):
+        generator = self.yield_tester()
+        
+        next(generator)
+        # 'next(generator)' is exactly equivelant to 'generator.send(None)'
+        self.assertEqual(__, generator.send(None))
+
+