-
Notifications
You must be signed in to change notification settings - Fork 94
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
Raises error if no sample found. #626
Raises error if no sample found. #626
Conversation
tests/command_download_invalid.py
Outdated
@@ -14,6 +16,9 @@ def snippet_call_download_twice(self, *args, **kwargs): | |||
def test_call_download_invalid(self): | |||
self.snippet_call_download_raises(requests.exceptions.InvalidURL, 'https://not_exist_contest.jp/tasks/001_a') | |||
|
|||
def test_call_download_no_sample_found(self): # See https://github.com/kmyk/online-judge-tools/issues/625 |
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.
#625 の問題は本来は取得に成功してほしいものなので、ここでテストとして使うのは不適切に見えます。後でバグが修正されたときにここのテストが落ちるのはうれしくないです。
別の問題を探すか、もう少しコメントを足したいように思います。
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.
How about this problem?
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.
@kawacchu Thanks! I applied your proposal.
a961053
to
fabbc06
Compare
There are two failed tests. First, test_call_download_hackerrank_hourrank_30_a_system requires signup or login now.
|
fabbc06
to
0e40e52
Compare
|
I agree your opinion! |
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.
Looks Good To Me. Thanks!
When user use
download
, they expect any samples will be downloaded.That means, if no samples are downloaded, it is unexpected behavior.
It is user friendly,
oj
shows error occurred explicitly.