~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_nonascii.py

  • Committer: Patch Queue Manager
  • Date: 2016-01-31 13:36:59 UTC
  • mfrom: (6613.1.5 1538480-match-hostname)
  • Revision ID: pqm@pqm.ubuntu.com-20160131133659-ouy92ee2wlv9xz8m
(vila) Use ssl.match_hostname instead of our own. (Vincent Ladeuil)

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