~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_counted_lock.py

  • Committer: Martin Packman
  • Date: 2012-02-01 13:24:42 UTC
  • mto: (6437.23.4 2.5)
  • mto: This revision was merged to the branch mainline in revision 6462.
  • Revision ID: martin.packman@canonical.com-20120201132442-ela7jc4mxv4b058o
Treat path for .bzr.log as unicode

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2008, 2009, 2016 Canonical Ltd
 
1
# Copyright (C) 2007, 2008, 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
143
143
        self.assertTrue(l.is_locked())
144
144
        l.unlock()
145
145
        self.assertFalse(l.is_locked())
146
 
        self.assertEqual(
 
146
        self.assertEquals(
147
147
            ['lock_read', 'unlock'],
148
148
            real_lock._calls)
149
149
 
157
157
        l = CountedLock(real_lock)
158
158
        l.lock_write()
159
159
        l.lock_read()
160
 
        self.assertEqual('token', l.lock_write())
 
160
        self.assertEquals('token', l.lock_write())
161
161
        l.unlock()
162
162
        l.unlock()
163
163
        l.unlock()
164
164
        self.assertFalse(l.is_locked())
165
 
        self.assertEqual(
 
165
        self.assertEquals(
166
166
            ['lock_write', 'unlock'],
167
167
            real_lock._calls)
168
168
 
174
174
        self.assertRaises(ReadOnlyError, l.lock_write)
175
175
        l.unlock()
176
176
        self.assertFalse(l.is_locked())
177
 
        self.assertEqual(
 
177
        self.assertEquals(
178
178
            ['lock_read', 'unlock'],
179
179
            real_lock._calls)
180
180