Example #1
0
 def test_setFinalFolder(self):
     '''Check that the new final folder is set properly.
     '''
     ph = PathHolder(self.fake_abs_path)
     ph.setFinalFolder('fifth')
     self.assertEqual('c:\\first\\second\\third\\fifth', ph.root, 'set absolute final folder fail')
      
     ph = PathHolder(self.fake_relative_path)
     ph.setFinalFolder('fifth')
     self.assertEqual('..\\fifth', ph.relative_root, 'set relative final folder fail')
Example #2
0
    def test_setFinalFolder(self):
        '''Check that the new final folder is set properly.
        '''
        ph = PathHolder(self.fake_abs_path)
        ph.setFinalFolder('fifth')
        self.assertEqual('c:\\first\\second\\third\\fifth', ph.root,
                         'set absolute final folder fail')

        ph = PathHolder(self.fake_relative_path)
        ph.setFinalFolder('fifth')
        self.assertEqual('..\\fifth', ph.relative_root,
                         'set relative final folder fail')
Example #3
0
    def test_setFinalFolder(self):
        '''Check that the new final folder is set properly.
        '''
        ph = PathHolder(self.fake_abs_path)
        ph.setFinalFolder('fifth')
        pth = os.path.join(self.prefix, 'first', 'second', 'third', 'fifth')
        self.assertEqual(pth, ph.root, 'set absolute final folder fail')

        ph = PathHolder(self.fake_relative_path)
        ph.setFinalFolder('fifth')
        self.assertEqual(os.path.join('..', 'fifth'), ph.relative_root,
                         'set relative final folder fail')