Back to index

enigmail  1.4.3
Public Member Functions
unit-expandlibs.TestRelativize Class Reference

List of all members.

Public Member Functions

def test_relativize

Detailed Description

Definition at line 56 of file

Member Function Documentation

def unit-expandlibs.TestRelativize.test_relativize (   self)
Test relativize()

Definition at line 57 of file

00058     def test_relativize(self):
00059         '''Test relativize()'''
00060         os_path_exists = os.path.exists
00061         def exists(path):
00062             return True
00063         os.path.exists = exists
00064         self.assertEqual(relativize(os.path.abspath(os.curdir)), os.curdir)
00065         self.assertEqual(relativize(os.path.abspath(os.pardir)), os.pardir)
00066         self.assertEqual(relativize(os.path.join(os.curdir, 'a')), 'a')
00067         self.assertEqual(relativize(os.path.join(os.path.abspath(os.curdir), 'a')), 'a')
00068         # relativize is expected to return the absolute path if it is shorter
00069         self.assertEqual(relativize(os.sep), os.sep)
00070         os.path.exists = os.path.exists

Here is the call graph for this function:

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