/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/__init__.py

  • Committer: Vincent Ladeuil
  • Date: 2009-09-19 16:14:10 UTC
  • mto: (4707.2.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4708.
  • Revision ID: v.ladeuil+lp@free.fr-20090919161410-lmlunl2q9kbzd3x0
Fix OSX and FreeBSD failures.

* bzrlib/tests/__init__.py:
(TestCaseWithMemoryTransport._make_test_root): Fixing the problem
at the root, if we usr the real path there, we catch 99% of the
consequences.

* bzrlib/tests/test_osutils.py:
(TestCanonicalRelPath.test_canonical_relpath_simple,
TestCanonicalRelPath.test_canonical_relpath_missing_tail): No need
to use realpath here anymore.

* bzrlib/tests/script.py:
(ScriptRunner.do_rm): OSX and BSD raises a different exception,
and windows too even if that will require real testing (but
osutils._delete_file_or_dir use the same trick for unlink so it's
a pretty safe bet).

* bzrlib/tests/blackbox/test_outside_wt.py:
(TestOutsideWT.test_cwd_log,
TestOutsideWT.test_diff_outside_tree): Watch for OSX trick.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2346
2346
 
2347
2347
    def _make_test_root(self):
2348
2348
        if TestCaseWithMemoryTransport.TEST_ROOT is None:
2349
 
            root = osutils.mkdtemp(prefix='testbzr-', suffix='.tmp')
 
2349
            # Watch out for tricky test dir (on OSX /tmp -> /private/tmp)
 
2350
            root = osutils.realpath(osutils.mkdtemp(prefix='testbzr-',
 
2351
                                                    suffix='.tmp'))
2350
2352
            TestCaseWithMemoryTransport.TEST_ROOT = root
2351
2353
 
2352
2354
            self._create_safety_net()