~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

Make the fork tests check the right code on single core machines

Show diffs side-by-side

added added

removed removed

Lines of Context:
3468
3468
        # GZ 2011-05-26: Add a PosixSystem feature so this check can go away
3469
3469
        if getattr(os, "fork", None) is None:
3470
3470
            raise tests.TestNotApplicable("Platform doesn't support forking")
 
3471
        # Make sure the fork code is actually invoked by claiming two cores
 
3472
        self.overrideAttr(osutils, "local_concurrency", lambda: 2)
3471
3473
        kwargs.setdefault("suite_decorators", []).append(tests.fork_decorator)
3472
3474
        return TestUncollectedWarnings._run_selftest_with_suite(self, **kwargs)
3473
3475