Back to index

obnam  1.1
Public Member Functions | Public Attributes
obnamlib.vfs_local_tests.LocalFSTests Class Reference
Inheritance diagram for obnamlib.vfs_local_tests.LocalFSTests:
Inheritance graph
[legend]
Collaboration diagram for obnamlib.vfs_local_tests.LocalFSTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def tearDown
def test_joins_relative_path_ok
def test_join_treats_absolute_path_as_absolute
def test_get_username_returns_root_for_zero
def test_get_groupname_returns_root_for_zero

Public Attributes

 basepath
 fs

Detailed Description

Definition at line 27 of file vfs_local_tests.py.


Member Function Documentation

Definition at line 29 of file vfs_local_tests.py.

00029 
00030     def setUp(self):
00031         self.basepath = tempfile.mkdtemp()
00032         self.fs = obnamlib.LocalFS(self.basepath)

Definition at line 33 of file vfs_local_tests.py.

00033 
00034     def tearDown(self):
00035         self.fs.close()
00036         shutil.rmtree(self.basepath)

Definition at line 47 of file vfs_local_tests.py.

00047 
00048     def test_get_groupname_returns_root_for_zero(self):
00049         self.assertEqual(self.fs.get_groupname(0), 'root')
00050 

Definition at line 44 of file vfs_local_tests.py.

00044 
00045     def test_get_username_returns_root_for_zero(self):
00046         self.assertEqual(self.fs.get_username(0), 'root')
    

Definition at line 41 of file vfs_local_tests.py.

00041 
00042     def test_join_treats_absolute_path_as_absolute(self):
00043         self.assertEqual(self.fs.join('/foo'), '/foo')
        

Definition at line 37 of file vfs_local_tests.py.

00037 
00038     def test_joins_relative_path_ok(self):
00039         self.assertEqual(self.fs.join('foo'), 
00040                          os.path.join(self.basepath, 'foo'))


Member Data Documentation

Definition at line 30 of file vfs_local_tests.py.

Definition at line 31 of file vfs_local_tests.py.


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