Back to index

python3.2  3.2.2
Public Member Functions
lib2to3.tests.test_parser.TestFunctionAnnotations Class Reference
Inheritance diagram for lib2to3.tests.test_parser.TestFunctionAnnotations:
Inheritance graph
[legend]
Collaboration diagram for lib2to3.tests.test_parser.TestFunctionAnnotations:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_1
def test_2
def test_3
def test_4
def test_5
def test_6
def test_7
def test_8
def validate
def invalid_syntax

Detailed Description

Definition at line 66 of file test_parser.py.


Member Function Documentation

def lib2to3.tests.test_parser.GrammarTest.invalid_syntax (   self,
  code 
) [inherited]

Definition at line 27 of file test_parser.py.

00027 
00028     def invalid_syntax(self, code):
00029         try:
00030             self.validate(code)
00031         except ParseError:
00032             pass
00033         else:
00034             raise AssertionError("Syntax shouldn't have been valid")
00035 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 67 of file test_parser.py.

00067 
00068     def test_1(self):
00069         self.validate("""def f(x) -> list: pass""")

Here is the call graph for this function:

Definition at line 70 of file test_parser.py.

00070 
00071     def test_2(self):
00072         self.validate("""def f(x:int): pass""")

Here is the call graph for this function:

Definition at line 73 of file test_parser.py.

00073 
00074     def test_3(self):
00075         self.validate("""def f(*x:str): pass""")

Here is the call graph for this function:

Definition at line 76 of file test_parser.py.

00076 
00077     def test_4(self):
00078         self.validate("""def f(**x:float): pass""")

Here is the call graph for this function:

Definition at line 79 of file test_parser.py.

00079 
00080     def test_5(self):
00081         self.validate("""def f(x, y:1+2): pass""")

Here is the call graph for this function:

Definition at line 82 of file test_parser.py.

00082 
00083     def test_6(self):
00084         self.validate("""def f(a, (b:1, c:2, d)): pass""")

Here is the call graph for this function:

Definition at line 85 of file test_parser.py.

00085 
00086     def test_7(self):
00087         self.validate("""def f(a, (b:1, c:2, d), e:3=4, f=5, *g:6): pass""")

Here is the call graph for this function:

Definition at line 88 of file test_parser.py.

00088 
00089     def test_8(self):
00090         s = """def f(a, (b:1, c:2, d), e:3=4, f=5,
00091                         *g:6, h:7, i=8, j:9=10, **k:11) -> 12: pass"""
00092         self.validate(s)
00093 

Here is the call graph for this function:

def lib2to3.tests.test_parser.GrammarTest.validate (   self,
  code 
) [inherited]

Reimplemented in lib2to3.tests.test_parser.TestLiterals.

Definition at line 24 of file test_parser.py.

00024 
00025     def validate(self, code):
00026         support.parse_string(code)

Here is the caller graph for this function:


The documentation for this class was generated from the following file: