Skip to content

Commit

Permalink
Translate beta samples fix [(#2327)](GoogleCloudPlatform/python-docs-…
Browse files Browse the repository at this point in the history
…samples#2327)

* fixing translate-with-glossary bug

* tests passing

* reverting to python3 compatibility

* snippets test fix
  • Loading branch information
crowdus authored and danoscarmike committed Jul 31, 2020
1 parent 1e0e557 commit 135c469
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def unique_glossary_id():
def test_translate_text(capsys):
beta_snippets.translate_text(PROJECT_ID, 'Hello world')
out, _ = capsys.readouterr()
assert 'Zdravo svet' in out
assert 'Zdravo svet' in out or 'Pozdrav svijetu' in out


def test_batch_translate_text(capsys, bucket):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ def test_translate_utf8(capsys):
text = u'나는 파인애플을 좋아한다.'
snippets.translate_text('en', text)
out, _ = capsys.readouterr()
assert u'I like pineapples.' in out
assert u'I like pineapple' in out

0 comments on commit 135c469

Please sign in to comment.