~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_nonascii.py

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil, Patch Queue Manager, Jelmer Vernooij
  • Date: 2017-01-17 16:20:41 UTC
  • mfrom: (6619.1.2 trunk)
  • Revision ID: tarmac-20170117162041-oo62uk1qsmgc9j31
Merge 2.7 into trunk including fixes for bugs #1622039, #1644003, #1579093 and #1645017. [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2008, 2009, 2011 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
23
23
from bzrlib import osutils
24
24
from bzrlib.osutils import pathjoin
25
25
from bzrlib.tests import TestCase, TestCaseWithTransport, TestSkipped
26
 
from bzrlib.workingtree import WorkingTree
27
26
 
28
27
 
29
28
class NonAsciiTest(TestCaseWithTransport):
36
35
        except UnicodeEncodeError:
37
36
            raise TestSkipped("filesystem can't accomodate nonascii names")
38
37
            return
39
 
        file(pathjoin(br_dir, "a"), "w").write("hello")
 
38
        with file(pathjoin(br_dir, "a"), "w") as f: f.write("hello")
40
39
        wt.add(["a"], ["a-id"])
41
40
 
42
41