Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

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 29bac9a commit dd8ef9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/snippets/beta_snippets_test.py
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
2 changes: 1 addition & 1 deletion samples/snippets/snippets_test.py
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 dd8ef9e

Please sign in to comment.