~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Ian Clatworthy
  • Date: 2009-05-18 21:48:44 UTC
  • mfrom: (4370.1.1 parent-directories)
  • mto: This revision was merged to the branch mainline in revision 4372.
  • Revision ID: ian.clatworthy@canonical.com-20090518214844-r8drldt0v3kt7ue6
(igc) added osutils.parent_directories() (Ian Clatworthy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
860
860
        self.assertRaises(errors.BzrError, osutils.splitpath, 'a/../b')
861
861
 
862
862
 
 
863
class TestParentDirectories(tests.TestCaseInTempDir):
 
864
    """Test osutils.parent_directories()"""
 
865
 
 
866
    def test_parent_directories(self):
 
867
        self.assertEqual([], osutils.parent_directories('a'))
 
868
        self.assertEqual(['a'], osutils.parent_directories('a/b'))
 
869
        self.assertEqual(['a/b', 'a'], osutils.parent_directories('a/b/c'))
 
870
 
 
871
 
863
872
class TestMacFuncsDirs(tests.TestCaseInTempDir):
864
873
    """Test mac special functions that require directories."""
865
874