Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
test.test_binhex.BinHexTestCase Class Reference
Collaboration diagram for test.test_binhex.BinHexTestCase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def tearDown
def test_binhex
def test_binhex_error_on_long_filename

Public Attributes

 fname1
 fname2
 fname3

Static Public Attributes

string DATA = 'Jack is my hero'

Detailed Description

Definition at line 13 of file test_binhex.py.


Member Function Documentation

Definition at line 15 of file test_binhex.py.

00015 
00016     def setUp(self):
00017         self.fname1 = support.TESTFN + "1"
00018         self.fname2 = support.TESTFN + "2"
00019         self.fname3 = support.TESTFN + "very_long_filename__very_long_filename__very_long_filename__very_long_filename__"

Here is the caller graph for this function:

Definition at line 20 of file test_binhex.py.

00020 
00021     def tearDown(self):
00022         support.unlink(self.fname1)
00023         support.unlink(self.fname2)
00024         support.unlink(self.fname3)

Here is the caller graph for this function:

Definition at line 27 of file test_binhex.py.

00027 
00028     def test_binhex(self):
00029         f = open(self.fname1, 'wb')
00030         f.write(self.DATA)
00031         f.close()
00032 
00033         binhex.binhex(self.fname1, self.fname2)
00034 
00035         binhex.hexbin(self.fname2, self.fname1)
00036 
00037         f = open(self.fname1, 'rb')
00038         finish = f.readline()
00039         f.close()
00040 
00041         self.assertEqual(self.DATA, finish)

Here is the call graph for this function:

The testcase fails if no exception is raised when a filename parameter provided to binhex.binhex()
is too long, or if the exception raised in binhex.binhex() is not an instance of binhex.Error.

Definition at line 42 of file test_binhex.py.

00042 
00043     def test_binhex_error_on_long_filename(self):
00044         """
00045         The testcase fails if no exception is raised when a filename parameter provided to binhex.binhex()
00046         is too long, or if the exception raised in binhex.binhex() is not an instance of binhex.Error.
00047         """
00048         f3 = open(self.fname3, 'wb')
00049         f3.close()
00050 
00051         self.assertRaises(binhex.Error, binhex.binhex, self.fname3, self.fname2)

Here is the call graph for this function:


Member Data Documentation

string test.test_binhex.BinHexTestCase.DATA = 'Jack is my hero' [static]

Definition at line 25 of file test_binhex.py.

Definition at line 16 of file test_binhex.py.

Definition at line 17 of file test_binhex.py.

Definition at line 18 of file test_binhex.py.


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