/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockable_files.py

  • Committer: Matt Nordhoff
  • Date: 2009-04-04 02:50:01 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4256.
  • Revision ID: mnordhoff@mattnordhoff.com-20090404025001-z1403k0tatmc8l91
Merge bzr.dev, fixing conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
from StringIO import StringIO
18
18
 
145
145
 
146
146
    def test__escape(self):
147
147
        self.assertEqual('%25', self.lockable._escape('%'))
148
 
        
 
148
 
149
149
    def test__escape_empty(self):
150
150
        self.assertEqual('', self.lockable._escape(''))
151
151
 
356
356
        third_lockable.unlock()
357
357
 
358
358
 
359
 
# This method of adapting tests to parameters is different to 
360
 
# the TestProviderAdapters used elsewhere, but seems simpler for this 
361
 
# case.  
 
359
# This method of adapting tests to parameters is different to
 
360
# the TestProviderAdapters used elsewhere, but seems simpler for this
 
361
# case.
362
362
class TestLockableFiles_TransportLock(TestCaseInTempDir,
363
363
                                      _TestLockableFiles_mixin):
364
364
 
381
381
 
382
382
    def get_lockable(self):
383
383
        return LockableFiles(self.sub_transport, 'my-lock', TransportLock)
384
 
        
 
384
 
385
385
 
386
386
class TestLockableFiles_LockDir(TestCaseInTempDir,
387
387
                              _TestLockableFiles_mixin):
391
391
        TestCaseInTempDir.setUp(self)
392
392
        self.transport = get_transport('.')
393
393
        self.lockable = self.get_lockable()
394
 
        # the lock creation here sets mode - test_permissions on branch 
395
 
        # tests that implicitly, but it might be a good idea to factor 
 
394
        # the lock creation here sets mode - test_permissions on branch
 
395
        # tests that implicitly, but it might be a good idea to factor
396
396
        # out the mode checking logic and have it applied to loackable files
397
397
        # directly. RBC 20060418
398
398
        self.lockable.create_lock()