remove unicode literals breaking py 2.x

This commit is contained in:
ssut 2015-06-05 23:50:33 +09:00
parent 7716ff39d5
commit e556332ecc
2 changed files with 4 additions and 4 deletions

View File

@ -6,9 +6,9 @@ You can translate text using this module.
Basic usage: Basic usage:
>>> from googletrans import translator >>> from googletrans import translator
>>> translator.translate(u'안녕하세요.') >>> translator.translate('안녕하세요.')
<Translated src=ko dest=en text=Good evening. pronunciation=Good evening.> <Translated src=ko dest=en text=Good evening. pronunciation=Good evening.>
>>> translator.translate(u'안녕하세요.', dest='ja') >>> translator.translate('안녕하세요.', dest='ja')
<Translated src=ko dest=ja text=こんにちは pronunciation=Kon'nichiwa.> <Translated src=ko dest=ja text=こんにちは pronunciation=Kon'nichiwa.>
>>> translator.translate('veritas lux mea', src='la') >>> translator.translate('veritas lux mea', src='la')
<Translated src=la dest=en text=The truth is my light pronunciation=The truth is my light> <Translated src=la dest=en text=The truth is my light pronunciation=The truth is my light>

View File

@ -11,8 +11,8 @@ class TranslateTests(unittest.TestCase):
assert result.text == 'The truth is my light' assert result.text == 'The truth is my light'
def test_unicode(self): def test_unicode(self):
result = translator.translate(u'안녕하세요.', src='ko', dest='ja') result = translator.translate('안녕하세요.', src='ko', dest='ja')
assert result.text == 'こんにちは。' assert result.text == u'こんにちは。'
def test_list_translation(self): def test_list_translation(self):
translations = translator.translate(['The quick brown fox', 'jumps over', 'the lazy dog'], translations = translator.translate(['The quick brown fox', 'jumps over', 'the lazy dog'],