~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Robert J. Tanner
  • Date: 2009-06-10 03:56:49 UTC
  • mfrom: (4423 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4425.
  • Revision ID: tanner@real-time.com-20090610035649-7rfx4cls4550zc3c
Merge 1.15.1 back to trunk

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
 
1751
1760
    def test_os_readlink_link_decoding(self):
1752
1761
        self.assertEquals(self.target.encode(osutils._fs_enc),
1753
1762
                          os.readlink(self.link.encode(osutils._fs_enc)))
 
1763
 
 
1764
 
 
1765
class TestConcurrency(tests.TestCase):
 
1766
 
 
1767
    def test_local_concurrency(self):
 
1768
        concurrency = osutils.local_concurrency()
 
1769
        self.assertIsInstance(concurrency, int)