Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

## Delta Between Two Patch Sets: Lib/test/test_generators.py

Issue 11682: PEP 380 reference implementation for 3.3
Left Patch Set: Created 8 years, 4 months ago
Right Patch Set: Created 8 years, 4 months ago
 Left: Base Patch Set 1: None Patch Set 2: None Patch Set 3: None Patch Set 4: None Patch Set 5: None Right: Patch Set 1: None Patch Set 2: None Patch Set 3: None Patch Set 4: None Patch Set 5: None
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/test_ast.py ('k') | Lib/test/test_grammar.py » ('j') | Modules/parsermodule.c » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Hide Comments ('s')
LEFTRIGHT
1 tutorial_tests = """ 1 tutorial_tests = """
2 Let's try a simple generator: 2 Let's try a simple generator:
3 3
4 >>> def f(): 4 >>> def f():
5 ... yield 1 5 ... yield 1
6 ... yield 2 6 ... yield 2
7 7
8 >>> for i in f(): 8 >>> for i in f():
9 ... print(i) 9 ... print(i)
10 1 10 1
(...skipping 1867 matching lines...)
1878 # This worms around a bootstrap problem. 1878 # This worms around a bootstrap problem.
1879 # Note that doctest and regrtest both look in sys.argv for a "-v" argument, 1879 # Note that doctest and regrtest both look in sys.argv for a "-v" argument,
1880 # so this works as expected in both ways of running regrtest. 1880 # so this works as expected in both ways of running regrtest.
1881 def test_main(verbose=None): 1881 def test_main(verbose=None):
1882 from test import support, test_generators 1882 from test import support, test_generators
1883 support.run_doctest(test_generators, verbose) 1883 support.run_doctest(test_generators, verbose)
1884 1884
1885 # This part isn't needed for regrtest, but for running the test directly. 1885 # This part isn't needed for regrtest, but for running the test directly.
1886 if __name__ == "__main__": 1886 if __name__ == "__main__":
1887 test_main(1) 1887 test_main(1)
LEFTRIGHT

This is Rietveld 894c83f36cb7+