wrap long lines

This commit is contained in:
Benjamin Peterson 2010-05-06 22:25:42 +00:00
parent 9eafe10783
commit 180799d4b3
1 changed files with 5 additions and 2 deletions

View File

@ -447,9 +447,12 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol):
# os.environ -> os.environb
value = 'euro\u20ac'
try:
value_bytes = value.encode(sys.getfilesystemencoding(), 'surrogateescape')
value_bytes = value.encode(sys.getfilesystemencoding(),
'surrogateescape')
except UnicodeEncodeError:
raise self.skip("U+20AC character is not encodable to %s" % sys.getfilesystemencoding())
msg = "U+20AC character is not encodable to %s" % (
sys.getfilesystemencoding(),)
self.skip(msg)
os.environ['unicode'] = value
self.assertEquals(os.environ['unicode'], value)
self.assertEquals(os.environb[b'unicode'], value_bytes)