~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_counted_lock.py

  • Committer: Patch Queue Manager
  • Date: 2016-01-15 09:21:49 UTC
  • mfrom: (6606.2.1 autodoc-unicode)
  • Revision ID: pqm@pqm.ubuntu.com-20160115092149-z5f4sfq3jvaz0enb
(vila) Fix autodoc runner when LANG=C. (Jelmer Vernooij)

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