~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_nonascii.py

  • Committer: Dylan McCall
  • Date: 2013-01-30 05:55:38 UTC
  • mto: This revision was merged to the branch mainline in revision 6573.
  • Revision ID: dylanmccall@ubuntu.com-20130130055538-bq141zfdskr0s9dw
Default value of "C" for Locale property in Apport problem report object

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