~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_selftest.py

  • Committer: Andrew Bennetts
  • Date: 2011-03-15 07:54:39 UTC
  • mfrom: (0.38.5 trunk)
  • mto: This revision was merged to the branch mainline in revision 5726.
  • Revision ID: andrew.bennetts@canonical.com-20110315075439-nzm293joz143cx0k
Merge bzr-changelog-merge plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""UI tests for the test framework."""
18
18
 
 
19
import os
 
20
 
19
21
from bzrlib import (
20
22
    tests,
21
23
    )
148
150
    def test_lsprof_tests(self):
149
151
        params = self.get_params_passed_to_core('selftest --lsprof-tests')
150
152
        self.assertEqual(True, params[1]["lsprof_tests"])
 
153
 
 
154
    def test_parallel_fork_unsupported(self):
 
155
        if getattr(os, "fork", None) is not None:
 
156
            self.addCleanup(setattr, os, "fork", os.fork)
 
157
            del os.fork
 
158
        out, err = self.run_bzr(["selftest", "--parallel=fork", "-s", "bt.x"],
 
159
            retcode=3)
 
160
        self.assertIn("platform does not support fork", err)
 
161
        self.assertFalse(out)