minor global state nit in status blackbox tests
Robert Collins
robertc at robertcollins.net
Tue Aug 22 06:20:28 BST 2006
Hi, these two blackbox status tests set bzrlib.user_encoding globally,
which seems undesirable. Perhaps run_bzr should be capable of setting
the user_encoding for the command being run ?
-Rob & Martin
def test_stdout_ascii(self):
sys.stdout = StringIO()
bzrlib.user_encoding = 'ascii'
working_tree = self.make_uncommitted_tree()
stdout, stderr = self.run_bzr("status")
self.assertEquals(stdout, """\
added:
hell?
""")
def test_stdout_latin1(self):
sys.stdout = StringIO()
bzrlib.user_encoding = 'latin-1'
working_tree = self.make_uncommitted_tree()
stdout, stderr = self.run_bzr('status')
self.assertEquals(stdout, u"""\
added:
hell\u00d8
""".encode('latin-1'))
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060822/0fd17f1e/attachment.pgp
More information about the bazaar
mailing list