Back to index

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

List of all members.

Public Member Functions

def test
def test_returns
def assertStr

Detailed Description

Definition at line 62 of file test_util.py.


Member Function Documentation

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 63 of file test_util.py.

00063 
00064     def test(self):
00065         call = parse("foo()", strip_levels=2)
00066 
00067         self.assertStr(Attr(Name("a"), Name("b")), "a.b")
00068         self.assertStr(Attr(call, Name("b")), "foo().b")

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 69 of file test_util.py.

00069 
00070     def test_returns(self):
00071         attr = Attr(Name("a"), Name("b"))
00072         self.assertEqual(type(attr), list)
00073 

Here is the call graph for this function:


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