Back to index

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

List of all members.

Public Member Functions

def test_2x_style_1
def test_2x_style_2
def test_2x_style_3
def test_2x_style_invalid_1
def test_3x_style
def test_3x_style_invalid_1
def test_3x_style_invalid_2
def test_3x_style_invalid_3
def test_3x_style_invalid_4
def validate
def invalid_syntax

Detailed Description

Definition at line 36 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 37 of file test_parser.py.

00037 
00038     def test_2x_style_1(self):
00039         self.validate("raise")

Here is the call graph for this function:

Definition at line 40 of file test_parser.py.

00040 
00041     def test_2x_style_2(self):
00042         self.validate("raise E, V")

Here is the call graph for this function:

Definition at line 43 of file test_parser.py.

00043 
00044     def test_2x_style_3(self):
00045         self.validate("raise E, V, T")

Here is the call graph for this function:

Definition at line 46 of file test_parser.py.

00046 
00047     def test_2x_style_invalid_1(self):
00048         self.invalid_syntax("raise E, V, T, Z")

Here is the call graph for this function:

Definition at line 49 of file test_parser.py.

00049 
00050     def test_3x_style(self):
00051         self.validate("raise E1 from E2")

Here is the call graph for this function:

Definition at line 52 of file test_parser.py.

00052 
00053     def test_3x_style_invalid_1(self):
00054         self.invalid_syntax("raise E, V from E1")

Here is the call graph for this function:

Definition at line 55 of file test_parser.py.

00055 
00056     def test_3x_style_invalid_2(self):
00057         self.invalid_syntax("raise E from E1, E2")

Here is the call graph for this function:

Definition at line 58 of file test_parser.py.

00058 
00059     def test_3x_style_invalid_3(self):
00060         self.invalid_syntax("raise from E1, E2")

Here is the call graph for this function:

Definition at line 61 of file test_parser.py.

00061 
00062     def test_3x_style_invalid_4(self):
00063         self.invalid_syntax("raise E from")
00064 
00065 
# Adapated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef

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: