/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Vincent Ladeuil
  • Date: 2009-06-04 11:05:37 UTC
  • mto: (4412.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4413.
  • Revision ID: v.ladeuil+lp@free.fr-20090604110537-apsikpui9ufvke95
Detect # cores on win32 and Solaris too.

* bzrlib/tests/test_osutils.py:
(TestConcurrency): Add a smoke test for local_concurrency().

* bzrlib/tests/__init__.py: 
(local_concurrency): Moved to osutils, all calls updated.

* bzrlib/osutils.py:
(local_concurrency): Moved from tests/__init__.py, add more
platform specific implementations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1760
1760
    def test_os_readlink_link_decoding(self):
1761
1761
        self.assertEquals(self.target.encode(osutils._fs_enc),
1762
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)