Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Fix flaky movie_nl tests
Browse files Browse the repository at this point in the history
Change-Id: I4922637173048627f38b507588a4f30a5d490212
  • Loading branch information
Jon Wayne Parrott authored and busunkim96 committed Sep 29, 2020
1 parent a1a4626 commit 9dc7560
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions samples/snippets/movie_nl/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ def test_process_movie_reviews():
entities = [json.loads(entity) for entity in entities]

# assert sentiments
assert sentiments[0].get('sentiment') == 0.9
assert sentiments[0].get('sentiment') > 0
assert sentiments[0].get('label') == 1

assert sentiments[1].get('sentiment') == 0.9
assert sentiments[1].get('sentiment') > 0
assert sentiments[1].get('label') == 1

# assert entities
assert len(entities) == 1
assert entities[0].get('name') == 'Tom Cruise'
assert (entities[0].get('wiki_url') ==
'http://en.wikipedia.org/wiki/Tom_Cruise')
assert entities[0].get('sentiment') == 1.8
'https://en.wikipedia.org/wiki/Tom_Cruise')
assert entities[0].get('sentiment') > 0


def test_rank_positive_entities(capsys):
Expand Down

0 comments on commit 9dc7560

Please sign in to comment.