~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-14 08:08:36 UTC
  • mfrom: (5425.4.30 220464-stale-locks)
  • Revision ID: pqm@pqm.ubuntu.com-20110614080836-d06kod1br6j1rx6j
(mbp) optionally detect and steal dead locks from the same machine and user
 (bug 220464) (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1070
1070
        # break some locks on purpose and should be taken into account by
1071
1071
        # considering that breaking a lock is just a dirty way of releasing it.
1072
1072
        if len(acquired_locks) != (len(released_locks) + len(broken_locks)):
1073
 
            message = ('Different number of acquired and '
1074
 
                       'released or broken locks. (%s, %s + %s)' %
1075
 
                       (acquired_locks, released_locks, broken_locks))
 
1073
            message = (
 
1074
                'Different number of acquired and '
 
1075
                'released or broken locks.\n'
 
1076
                'acquired=%s\n'
 
1077
                'released=%s\n'
 
1078
                'broken=%s\n' %
 
1079
                (acquired_locks, released_locks, broken_locks))
1076
1080
            if not self._lock_check_thorough:
1077
1081
                # Rather than fail, just warn
1078
1082
                print "Broken test %s: %s" % (self, message)