~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_lock/test_lock.py

  • Committer: Vincent Ladeuil
  • Date: 2017-01-17 13:48:10 UTC
  • mfrom: (6615.3.6 merges)
  • mto: This revision was merged to the branch mainline in revision 6620.
  • Revision ID: v.ladeuil+lp@free.fr-20170117134810-j9p3lidfy6pfyfsc
Merge 2.7, resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007 Canonical Ltd
 
1
# Copyright (C) 2007, 2009, 2010 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
21
21
    osutils,
22
22
    )
23
23
 
24
 
from bzrlib.tests import UnicodeFilenameFeature
 
24
from bzrlib.tests import (
 
25
    features,
 
26
    )
25
27
from bzrlib.tests.per_lock import TestCaseWithLock
26
28
 
27
29
 
63
65
 
64
66
        But we shouldn't be able to take a write lock.
65
67
        """
 
68
        self.requireFeature(features.not_running_as_root)
66
69
        osutils.make_readonly('a-file')
67
70
        # Make sure the file is read-only (on all platforms)
68
71
        self.assertRaises(IOError, open, 'a-file', 'rb+')
165
168
 
166
169
class TestLockUnicodePath(TestCaseWithLock):
167
170
 
168
 
    _test_needs_features = [UnicodeFilenameFeature]
 
171
    _test_needs_features = [features.UnicodeFilenameFeature]
169
172
 
170
173
    def test_read_lock(self):
171
174
        self.build_tree([u'\u1234'])