~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/repository_implementations/test_repository.py

  • Committer: Robert Collins
  • Date: 2007-03-28 13:33:58 UTC
  • mto: (2018.5.115 hpss)
  • mto: This revision was merged to the branch mainline in revision 2383.
  • Revision ID: robertc@robertcollins.net-20070328133358-wn7wgnzmb0cjohjk
Fixup the test changes made for hpss to be clean and self contained.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
        readonly_t = get_transport(self.get_readonly_url())
108
108
        made_control = self.bzrdir_format.initialize(t.base)
109
109
        made_repo = self.repository_format.initialize(made_control)
110
 
        ## self.failUnless(isinstance(made_repo, repository.Repository))
111
110
        self.assertEqual(made_control, made_repo.bzrdir)
112
111
 
113
112
        # find it via bzrdir opening:
143
142
        made_repo = made_control.create_repository()
144
143
        # Check that we have a repository object.
145
144
        made_repo.has_revision('foo')
146
 
        
147
145
        self.assertEqual(made_control, made_repo.bzrdir)
148
146
        
149
147
    def test_create_repository_shared(self):
163
161
            return
164
162
        # Check that we have a repository object.
165
163
        made_repo.has_revision('foo')
166
 
 
167
164
        self.assertEqual(made_control, made_repo.bzrdir)
168
165
        self.assertTrue(made_repo.is_shared())
169
166
 
447
444
 
448
445
class TestRepositoryLocking(TestCaseWithRepository):
449
446
 
450
 
    def setUp(self):
451
 
        TestCaseWithRepository.setUp(self)
452
 
        # XXX: This lock timeout fiddling occurs in other tests (e.g.
453
 
        # test_lockable_files) too.
454
 
        orig_timeout = lockdir._DEFAULT_TIMEOUT_SECONDS
455
 
        def resetTimeout():
456
 
            lockdir._DEFAULT_TIMEOUT_SECONDS = orig_timeout
457
 
        self.addCleanup(resetTimeout)
458
 
        lockdir._DEFAULT_TIMEOUT_SECONDS = 0
459
 
 
460
447
    def test_lock_read_then_unlock(self):
461
448
        # Calling lock_read then unlocking should work without errors.
462
449
        repo = self.make_repository('r')