Back to index

python3.2  3.2.2
Public Member Functions
test_unparse.ASTTestCase Class Reference
Inheritance diagram for test_unparse.ASTTestCase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def assertASTEqual
def check_roundtrip

Detailed Description

Definition at line 96 of file test_unparse.py.


Member Function Documentation

def test_unparse.ASTTestCase.assertASTEqual (   self,
  ast1,
  ast2 
)

Definition at line 97 of file test_unparse.py.

00097 
00098     def assertASTEqual(self, ast1, ast2):
00099         self.assertEqual(ast.dump(ast1), ast.dump(ast2))

Here is the call graph for this function:

Here is the caller graph for this function:

def test_unparse.ASTTestCase.check_roundtrip (   self,
  code1,
  filename = "internal" 
)

Definition at line 100 of file test_unparse.py.

00100 
00101     def check_roundtrip(self, code1, filename="internal"):
00102         ast1 = compile(code1, filename, "exec", ast.PyCF_ONLY_AST)
00103         unparse_buffer = io.StringIO()
00104         unparse.Unparser(ast1, unparse_buffer)
00105         code2 = unparse_buffer.getvalue()
00106         ast2 = compile(code2, filename, "exec", ast.PyCF_ONLY_AST)
00107         self.assertASTEqual(ast1, ast2)

Here is the call graph for this function:

Here is the caller graph for this function:


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