~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.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:
884
884
    def _track_locks(self):
885
885
        """Track lock activity during tests."""
886
886
        self._lock_actions = []
887
 
        self._lock_check_thorough = 'lock' in debug.debug_flags
 
887
        self._lock_check_thorough = 'lock' not in debug.debug_flags
888
888
        self.addCleanup(self._check_locks)
889
889
        _mod_lock.Lock.hooks.install_named_hook('lock_acquired',
890
890
                                                self._lock_acquired, None)