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

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

Issue 11682: PEP 380 reference implementation for 3.3
Left Patch Set: Created 7 years, 8 months ago
Right Patch Set: Created 7 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
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...) Expand 10 before | Expand all | Expand 10 after
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

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+