ACC SHELL
Ñò
sÄMc
@ sI d Z d d k l Z d d k l Z l Z d d k Z d d k Z d d k Z d d k l Z d d k
l Z d e i f d
„ ƒ YZ
d e
f d „ ƒ YZ d
e
f d „ ƒ YZ d e
f d „ ƒ YZ d e
f d „ ƒ YZ d e
f d „ ƒ YZ d e
f d „ ƒ YZ d e i f d „ ƒ YZ d e
f d „ ƒ YZ d „ Z d S( sF Test suite for 2to3's parser and grammar files.
This is the place to add tests for changes to 2to3's grammar, such as those
merging the grammars for Python 2 and 3. In addition to specific tests for
parts of the grammar we've changed, we also make sure we can parse the
test_grammar.py files from both Python 2 and Python 3.
i ( t support( t drivert test_diriÿÿÿÿN( t tokenizei ( t
ParseErrort GrammarTestc B s e Z d „ Z d „ Z RS( c C s t i | ƒ d S( N( R t parse_string( t selft code( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt validate s c C s7 y | i | ƒ Wn t j
o n Xt d ƒ ‚ d S( Ns Syntax shouldn't have been valid( R R t AssertionError( R R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt invalid_syntax s
( t __name__t
__module__R R ( ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyR s t TestRaiseChangesc B sY e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
RS( c C s | i d ƒ d S( Nt raise( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_2x_style_1% s c C s | i d ƒ d S( Ns
raise E, V( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_2x_style_2( s c C s | i d ƒ d S( Ns
raise E, V, T( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_2x_style_3+ s c C s | i d ƒ d S( Ns raise E, V, T, Z( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_2x_style_invalid_1. s c C s | i d ƒ d S( Ns raise E1 from E2( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt
test_3x_style1 s c C s | i d ƒ d S( Ns raise E, V from E1( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_3x_style_invalid_14 s c C s | i d ƒ d S( Ns raise E from E1, E2( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_3x_style_invalid_27 s c C s | i d ƒ d S( Ns raise from E1, E2( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_3x_style_invalid_3: s c C s | i d ƒ d S( Ns raise E from( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_3x_style_invalid_4= s ( R R
R R R R R R R R R ( ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyR $ s t TestFunctionAnnotationsc B sP e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C s | i d ƒ d S( Ns def f(x) -> list: pass( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_1C s c C s | i d ƒ d S( Ns def f(x:int): pass( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_2F s c C s | i d ƒ d S( Ns def f(*x:str): pass( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_3I s c C s | i d ƒ d S( Ns def f(**x:float): pass( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_4L s c C s | i d ƒ d S( Ns def f(x, y:1+2): pass( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_5O s c C s | i d ƒ d S( Ns def f(a, (b:1, c:2, d)): pass( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_6R s c C s | i d ƒ d S( Ns/ def f(a, (b:1, c:2, d), e:3=4, f=5, *g:6): pass( R ( R ( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_7U s c C s d } | i | ƒ d S( Nsg def f(a, (b:1, c:2, d), e:3=4, f=5,
*g:6, h:7, i=8, j:9=10, **k:11) -> 12: pass( R ( R t s( ( s/ /usr/lib/python2.6/lib2to3/tests/test_parser.pyt test_8X s (
R R
R R R R R R R R"