~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Vincent Ladeuil
  • Date: 2009-05-12 08:07:37 UTC
  • mto: (4350.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4354.
  • Revision ID: v.ladeuil+lp@free.fr-20090512080737-itf02crgp0kxir0p
Fixed as per Robert's review.

* tests/__init__.py:
(TestCase._track_locks): Make unbalanced locks fatal.

* tests/test_selftest.py:
(TestTestCaseWithMemoryTransport.test_dangling_locks_cause_failures):
The failure is now unconditional.

Show diffs side-by-side

added added

removed removed

Lines of Context:
622
622
        self.assertRaises(AssertionError, self._check_safety_net)
623
623
 
624
624
    def test_dangling_locks_cause_failures(self):
625
 
        # This is currently only enabled during debug runs, so turn debugging
626
 
        # on.
627
 
        debug.debug_flags.add('lock')
628
625
        class TestDanglingLock(TestCaseWithMemoryTransport):
629
626
            def test_function(self):
630
627
                t = self.get_transport('.')