Back to index

python3.2  3.2.2
Public Member Functions
lib2to3.tests.test_util.Test_is_tuple Class Reference

List of all members.

Public Member Functions

def is_tuple
def test_valid
def test_invalid

Detailed Description

Definition at line 31 of file test_util.py.


Member Function Documentation

def lib2to3.tests.test_util.Test_is_tuple.is_tuple (   self,
  string 
)

Definition at line 32 of file test_util.py.

00032 
00033     def is_tuple(self, string):
00034         return fixer_util.is_tuple(parse(string, strip_levels=2))

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 42 of file test_util.py.

00042 
00043     def test_invalid(self):
00044         self.assertFalse(self.is_tuple("(a)"))
00045         self.assertFalse(self.is_tuple("('foo') % (b, c)"))
00046 

Here is the call graph for this function:

Definition at line 35 of file test_util.py.

00035 
00036     def test_valid(self):
00037         self.assertTrue(self.is_tuple("(a, b)"))
00038         self.assertTrue(self.is_tuple("(a, (b, c))"))
00039         self.assertTrue(self.is_tuple("((a, (b, c)),)"))
00040         self.assertTrue(self.is_tuple("(a,)"))
00041         self.assertTrue(self.is_tuple("()"))

Here is the call graph for this function:


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