~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_locking.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-10-08 03:11:35 UTC
  • mfrom: (4634.62.5 only-raises)
  • Revision ID: pqm@pqm.ubuntu.com-20091008031135-6d7vxh4s0umav1eo
(andrew) Add 'only_raises' decorator,
        use it to suppress most errors from Branch/Repository.unlock.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
        try:
140
140
            self.assertTrue(b.is_locked())
141
141
            self.assertTrue(b.repository.is_locked())
142
 
            self.assertRaises(TestPreventLocking, b.unlock)
 
142
            self.assertLogsError(TestPreventLocking, b.unlock)
143
143
            if self.combined_control:
144
144
                self.assertTrue(b.is_locked())
145
145
            else:
183
183
        try:
184
184
            self.assertTrue(b.is_locked())
185
185
            self.assertTrue(b.repository.is_locked())
186
 
            self.assertRaises(TestPreventLocking, b.unlock)
 
186
            self.assertLogsError(TestPreventLocking, b.unlock)
187
187
            self.assertTrue(b.is_locked())
188
188
            self.assertTrue(b.repository.is_locked())
189
189