remove unicode literals breaking py 2.x
This commit is contained in:
parent
7716ff39d5
commit
e556332ecc
@ -6,9 +6,9 @@ You can translate text using this module.
|
||||
|
||||
Basic usage:
|
||||
>>> from googletrans import translator
|
||||
>>> translator.translate(u'안녕하세요.')
|
||||
>>> translator.translate('안녕하세요.')
|
||||
<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.>
|
||||
>>> translator.translate('veritas lux mea', src='la')
|
||||
<Translated src=la dest=en text=The truth is my light pronunciation=The truth is my light>
|
||||
|
4
tests.py
4
tests.py
@ -11,8 +11,8 @@ class TranslateTests(unittest.TestCase):
|
||||
assert result.text == 'The truth is my light'
|
||||
|
||||
def test_unicode(self):
|
||||
result = translator.translate(u'안녕하세요.', src='ko', dest='ja')
|
||||
assert result.text == 'こんにちは。'
|
||||
result = translator.translate('안녕하세요.', src='ko', dest='ja')
|
||||
assert result.text == u'こんにちは。'
|
||||
|
||||
def test_list_translation(self):
|
||||
translations = translator.translate(['The quick brown fox', 'jumps over', 'the lazy dog'],
|
||||
|
Loading…
Reference in New Issue
Block a user