/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: Robert Collins
  • Date: 2007-09-27 21:11:38 UTC
  • mfrom: (2871 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2879.
  • Revision ID: robertc@robertcollins.net-20070927211138-ebsu1bo1qz9f1w8n
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
    pass
73
73
from bzrlib.merge import merge_inner
74
74
import bzrlib.merge3
75
 
import bzrlib.osutils
76
75
import bzrlib.plugin
77
76
from bzrlib.revision import common_ancestor
78
77
import bzrlib.store
983
982
        self.assertEqual(mode, actual_mode,
984
983
            'mode of %r incorrect (%o != %o)' % (path, mode, actual_mode))
985
984
 
 
985
    def assertIsSameRealPath(self, path1, path2):
 
986
        """Fail if path1 and path2 points to different files"""
 
987
        self.assertEqual(osutils.realpath(path1),
 
988
                         osutils.realpath(path2),
 
989
                         "apparent paths:\na = %s\nb = %s\n," % (path1, path2))
 
990
 
986
991
    def assertIsInstance(self, obj, kls):
987
992
        """Fail if obj is not an instance of kls"""
988
993
        if not isinstance(obj, kls):
1878
1883
    def _make_test_root(self):
1879
1884
        if TestCaseWithMemoryTransport.TEST_ROOT is not None:
1880
1885
            return
1881
 
        root = tempfile.mkdtemp(prefix='testbzr-', suffix='.tmp')
 
1886
        root = osutils.mkdtemp(prefix='testbzr-', suffix='.tmp')
1882
1887
        TestCaseWithMemoryTransport.TEST_ROOT = root
1883
1888
        
1884
1889
        # make a fake bzr directory there to prevent any tests propagating
1994
1999
        name and then create two subdirs - test and home under it.
1995
2000
        """
1996
2001
        # create a directory within the top level test directory
1997
 
        candidate_dir = tempfile.mkdtemp(dir=self.TEST_ROOT)
 
2002
        candidate_dir = osutils.mkdtemp(dir=self.TEST_ROOT)
1998
2003
        # now create test and home directories within this dir
1999
2004
        self.test_base_dir = candidate_dir
2000
2005
        self.test_home_dir = self.test_base_dir + '/home'