Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0a86e80

Browse filesBrowse files
author
Jon Wayne Parrott
committed
Fix flaky movie_nl tests
Change-Id: I4922637173048627f38b507588a4f30a5d490212
1 parent e2d8c14 commit 0a86e80
Copy full SHA for 0a86e80

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎language/movie_nl/main_test.py

Copy file name to clipboardExpand all lines: language/movie_nl/main_test.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,18 @@ def test_process_movie_reviews():
7070
entities = [json.loads(entity) for entity in entities]
7171

7272
# assert sentiments
73-
assert sentiments[0].get('sentiment') == 0.9
73+
assert sentiments[0].get('sentiment') > 0
7474
assert sentiments[0].get('label') == 1
7575

76-
assert sentiments[1].get('sentiment') == 0.9
76+
assert sentiments[1].get('sentiment') > 0
7777
assert sentiments[1].get('label') == 1
7878

7979
# assert entities
8080
assert len(entities) == 1
8181
assert entities[0].get('name') == 'Tom Cruise'
8282
assert (entities[0].get('wiki_url') ==
83-
'http://en.wikipedia.org/wiki/Tom_Cruise')
84-
assert entities[0].get('sentiment') == 1.8
83+
'https://en.wikipedia.org/wiki/Tom_Cruise')
84+
assert entities[0].get('sentiment') > 0
8585

8686

8787
def test_rank_positive_entities(capsys):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.