~bzr/ubuntu/lucid/bzr/beta-ppa

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_non_ascii.py

  • Committer: Max Bowsher
  • Date: 2011-02-09 04:08:25 UTC
  • mfrom: (0.5074.6 lucid)
  • Revision ID: maxb@f2s.com-20110209040825-7jqm4i78b8ojoy9z
Merge beta-ppa into ppa upon release of 2.3.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-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
25
25
    urlutils,
26
26
    )
27
27
from bzrlib.tests import EncodingAdapter
28
 
 
29
 
 
30
 
def load_tests(standard_tests, module, loader):
31
 
    return tests.multiply_tests(standard_tests,
32
 
                                EncodingAdapter.encoding_scenarios,
33
 
                                loader.suiteClass())
 
28
from bzrlib.tests.scenarios import load_tests_apply_scenarios
 
29
 
 
30
 
 
31
load_tests = load_tests_apply_scenarios
34
32
 
35
33
 
36
34
class TestNonAscii(tests.TestCaseWithTransport):
37
35
    """Test that bzr handles files/committers/etc which are non-ascii."""
38
36
 
 
37
    scenarios = EncodingAdapter.encoding_scenarios
 
38
 
39
39
    def setUp(self):
40
40
        super(TestNonAscii, self).setUp()
41
41
        self._check_can_encode_paths()
42
42
 
43
43
        self.overrideAttr(osutils, '_cached_user_encoding', self.encoding)
44
44
        email = self.info['committer'] + ' <joe@foo.com>'
45
 
        os.environ['BZR_EMAIL'] = email.encode(osutils.get_user_encoding())
 
45
        self.overrideEnv('BZR_EMAIL', email.encode(osutils.get_user_encoding()))
46
46
        self.create_base()
47
47
 
48
48
    def run_bzr_decode(self, args, encoding=None, fail=False, retcode=None,