summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_grammar.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r--Lib/test/test_grammar.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 2c1b6ca..bd04735 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -785,9 +785,9 @@ class GrammarTests(unittest.TestCase):
def testGenexps(self):
# generator expression tests
g = ([x for x in range(10)] for x in range(1))
- self.assertEqual(g.next(), [x for x in range(10)])
+ self.assertEqual(next(g), [x for x in range(10)])
try:
- g.next()
+ next(g)
self.fail('should produce StopIteration exception')
except StopIteration:
pass
@@ -795,7 +795,7 @@ class GrammarTests(unittest.TestCase):
a = 1
try:
g = (a for d in a)
- g.next()
+ next(g)
self.fail('should produce TypeError')
except TypeError:
pass