/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

merge trunk

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):
1830
1835
    def _make_test_root(self):
1831
1836
        if TestCaseWithMemoryTransport.TEST_ROOT is not None:
1832
1837
            return
1833
 
        root = tempfile.mkdtemp(prefix='testbzr-', suffix='.tmp')
 
1838
        root = osutils.mkdtemp(prefix='testbzr-', suffix='.tmp')
1834
1839
        TestCaseWithMemoryTransport.TEST_ROOT = root
1835
1840
        
1836
1841
        # make a fake bzr directory there to prevent any tests propagating
1946
1951
        name and then create two subdirs - test and home under it.
1947
1952
        """
1948
1953
        # create a directory within the top level test directory
1949
 
        candidate_dir = tempfile.mkdtemp(dir=self.TEST_ROOT)
 
1954
        candidate_dir = osutils.mkdtemp(dir=self.TEST_ROOT)
1950
1955
        # now create test and home directories within this dir
1951
1956
        self.test_base_dir = candidate_dir
1952
1957
        self.test_home_dir = self.test_base_dir + '/home'