~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2016-04-21 04:10:52 UTC
  • mfrom: (6616.1.1 fix-en-user-guide)
  • Revision ID: pqm@pqm.ubuntu.com-20160421041052-clcye7ns1qcl2n7w
(richard-wilbur) Ensure build of English use guide always uses English text
 even when user's locale specifies a different language. (Jelmer Vernooij)

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'])