~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ui.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-06-23 08:14:21 UTC
  • mfrom: (5311.4.1 encoding-option)
  • Revision ID: pqm@pqm.ubuntu.com-20100623081421-53539k281zgrktsu
(lifeless) Polish and adjust news for Martin's output_encoding branch.
 (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from StringIO import StringIO
25
25
 
26
26
from bzrlib import (
 
27
    config,
27
28
    errors,
28
29
    remote,
29
30
    repository,
33
34
from bzrlib.symbol_versioning import (
34
35
    deprecated_in,
35
36
    )
36
 
from bzrlib.tests import test_progress
 
37
from bzrlib.tests import (
 
38
    fixtures,
 
39
    test_progress,
 
40
    )
37
41
from bzrlib.ui import text as _mod_ui_text
38
42
 
39
43
 
 
44
class TestUIConfiguration(tests.TestCaseWithTransport):
 
45
 
 
46
    def test_output_encoding_configuration(self):
 
47
        enc = fixtures.generate_unicode_encodings().next()
 
48
        config.GlobalConfig().set_user_option('output_encoding',
 
49
            enc)
 
50
        ui = tests.TestUIFactory(stdin=None,
 
51
            stdout=tests.StringIOWrapper(),
 
52
            stderr=tests.StringIOWrapper())
 
53
        os = ui.make_output_stream()
 
54
        self.assertEquals(os.encoding, enc)
 
55
 
 
56
 
40
57
class TestTextUIFactory(tests.TestCase):
41
58
 
42
59
    def test_text_factory_ascii_password(self):