RubénEu
commited on
Commit
·
a27ea01
1
Parent(s):
a856ffc
Added tests for one character words
Browse files
deep_translator/tests/test_google_trans.py
CHANGED
|
@@ -58,3 +58,7 @@ def test_payload(google_translator):
|
|
| 58 |
|
| 59 |
#for _ in range(1):
|
| 60 |
#assert google_translator.translate(text='좋은') == "good"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
#for _ in range(1):
|
| 60 |
#assert google_translator.translate(text='좋은') == "good"
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
def test_one_character_words():
|
| 64 |
+
assert GoogleTranslator(source='es', target='en').translate('o') == 'or'
|
deep_translator/tests/test_linguee.py
CHANGED
|
@@ -47,3 +47,7 @@ def test_payload(linguee):
|
|
| 47 |
|
| 48 |
with pytest.raises(exceptions.NotValidLength):
|
| 49 |
linguee.translate("a"*51)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
with pytest.raises(exceptions.NotValidLength):
|
| 49 |
linguee.translate("a"*51)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def test_one_character_words():
|
| 53 |
+
assert LingueeTranslator(source='es', target='en').translate('y') == 'and'
|
deep_translator/tests/test_mymemory.py
CHANGED
|
@@ -46,3 +46,8 @@ def test_payload(mymemory):
|
|
| 46 |
|
| 47 |
with pytest.raises(exceptions.NotValidLength):
|
| 48 |
mymemory.translate(text="a"*501)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
with pytest.raises(exceptions.NotValidLength):
|
| 48 |
mymemory.translate(text="a"*501)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def test_one_character_words(mymemory):
|
| 52 |
+
assert mymemory.translate('I')
|
| 53 |
+
|
deep_translator/tests/test_pons.py
CHANGED
|
@@ -46,3 +46,7 @@ def test_payload(pons):
|
|
| 46 |
|
| 47 |
with pytest.raises(exceptions.NotValidLength):
|
| 48 |
pons.translate("a" * 51)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
with pytest.raises(exceptions.NotValidLength):
|
| 48 |
pons.translate("a" * 51)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def test_one_character_words(pons):
|
| 52 |
+
assert pons.translate('I')
|