Back to index

python3.2  3.2.2
Public Member Functions | Private Member Functions
lib2to3.tests.test_util.Test_Call Class Reference
Inheritance diagram for lib2to3.tests.test_util.Test_Call:
Inheritance graph
[legend]
Collaboration diagram for lib2to3.tests.test_util.Test_Call:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test
def assertStr

Private Member Functions

def _Call

Detailed Description

Definition at line 81 of file test_util.py.


Member Function Documentation

def lib2to3.tests.test_util.Test_Call._Call (   self,
  name,
  args = None,
  prefix = None 
) [private]
Help the next test

Definition at line 82 of file test_util.py.

00082 
00083     def _Call(self, name, args=None, prefix=None):
00084         """Help the next test"""
00085         children = []
00086         if isinstance(args, list):
00087             for arg in args:
00088                 children.append(arg)
00089                 children.append(Comma())
00090             children.pop()
00091         return Call(Name(name), children, prefix)

Here is the call graph for this function:

Here is the caller graph for this function:

def lib2to3.tests.test_util.MacroTestCase.assertStr (   self,
  node,
  string 
) [inherited]

Definition at line 25 of file test_util.py.

00025 
00026     def assertStr(self, node, string):
00027         if isinstance(node, (tuple, list)):
00028             node = Node(fixer_util.syms.simple_stmt, node)
00029         self.assertEqual(str(node), string)
00030 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 92 of file test_util.py.

00092 
00093     def test(self):
00094         kids = [None,
00095                 [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 2),
00096                  Leaf(token.NUMBER, 3)],
00097                 [Leaf(token.NUMBER, 1), Leaf(token.NUMBER, 3),
00098                  Leaf(token.NUMBER, 2), Leaf(token.NUMBER, 4)],
00099                 [Leaf(token.STRING, "b"), Leaf(token.STRING, "j", prefix=" ")]
00100                 ]
00101         self.assertStr(self._Call("A"), "A()")
00102         self.assertStr(self._Call("b", kids[1]), "b(1,2,3)")
00103         self.assertStr(self._Call("a.b().c", kids[2]), "a.b().c(1,3,2,4)")
00104         self.assertStr(self._Call("d", kids[3], prefix=" "), " d(b, j)")
00105 

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: