Back to index

python3.2  3.2.2
Public Member Functions
test.test_textwrap.BaseTestCase Class Reference
Inheritance diagram for test.test_textwrap.BaseTestCase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def show
def check
def check_wrap
def check_split

Detailed Description

Parent class with utility methods for textwrap tests.

Definition at line 17 of file test_textwrap.py.


Member Function Documentation

def test.test_textwrap.BaseTestCase.check (   self,
  result,
  expect 
)

Definition at line 31 of file test_textwrap.py.

00031 
00032     def check(self, result, expect):
00033         self.assertEqual(result, expect,
00034             'expected:\n%s\nbut got:\n%s' % (
00035                 self.show(expect), self.show(result)))

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_textwrap.BaseTestCase.check_split (   self,
  text,
  expect 
)

Definition at line 40 of file test_textwrap.py.

00040 
00041     def check_split(self, text, expect):
00042         result = self.wrapper._split(text)
00043         self.assertEqual(result, expect,
00044                          "\nexpected %r\n"
00045                          "but got  %r" % (expect, result))
00046 

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_textwrap.BaseTestCase.check_wrap (   self,
  text,
  width,
  expect,
  kwargs 
)

Definition at line 36 of file test_textwrap.py.

00036 
00037     def check_wrap(self, text, width, expect, **kwargs):
00038         result = wrap(text, width, **kwargs)
00039         self.check(result, expect)

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_textwrap.BaseTestCase.show (   self,
  textin 
)

Definition at line 20 of file test_textwrap.py.

00020 
00021     def show(self, textin):
00022         if isinstance(textin, list):
00023             result = []
00024             for i in range(len(textin)):
00025                 result.append("  %d: %r" % (i, textin[i]))
00026             result = '\n'.join(result)
00027         elif isinstance(textin, str):
00028             result = "  %s\n" % repr(textin)
00029         return result
00030 

Here is the caller graph for this function:


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