~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-05-18 22:41:44 UTC
  • mfrom: (4371.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090518224144-3izdthppda5ievhg
(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