~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Alexander Belchenko
  • Date: 2007-09-25 19:41:00 UTC
  • mfrom: (2862 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2866.
  • Revision ID: bialix@ukr.net-20070925194100-zw5hcmc85hf3m0uf
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'
2426
2431
                   'bzrlib.tests.test_permissions',
2427
2432
                   'bzrlib.tests.test_plugins',
2428
2433
                   'bzrlib.tests.test_progress',
 
2434
                   'bzrlib.tests.test_reconfigure',
2429
2435
                   'bzrlib.tests.test_reconcile',
2430
2436
                   'bzrlib.tests.test_registry',
2431
2437
                   'bzrlib.tests.test_remote',