-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #851, Error is raised instead of returning text [WiP] #902
Conversation
Return statement removed and error raised.
Removed test for single sentence input.
Please add a test that exception is raised |
Thanks for the improvement! |
…iskvorky#902) * Update summarizer.py Return statement removed and error raised. * Update test_summarization.py Removed test for single sentence input. * Update CHANGELOG.md * Update summarizer.py * Update test_wikicorpus.py * Update test_summarization.py
@@ -97,7 +97,7 @@ def test_text_summarization_returns_input_on_single_input_sentence(self): | |||
# Keeps the first sentence only. | |||
text = text.split('\n')[0] | |||
|
|||
self.assertEqual(summarize(text),text) | |||
self.assertRaises(ValueError,summarize,text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8: space after comma.
@@ -87,7 +87,7 @@ def test_text_summarization_raises_exception_on_short_input_text(self): | |||
text = "\n".join(text.split('\n')[:8]) | |||
|
|||
self.assertTrue(summarize(text) is not None) | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No trailing whitespace please.
@@ -31,7 +31,7 @@ def setUp(self): | |||
|
|||
|
|||
def test_get_texts_returns_generator_of_lists(self): | |||
|
|||
logger.debug("Current Python Version is "+str(sys.version_info)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8: space around binary operators.
No description provided.