Skip to content

Commit

Permalink
#413: Add test for sample parse error.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukatani committed Jul 3, 2019
1 parent b481e99 commit 6ec3fdf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/command_download_atcoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import requests.exceptions
import tests.command_download

from onlinejudge.type import SampleParseError


class DownloadAtCoderTest(unittest.TestCase):
def snippet_call_download(self, *args, **kwargs):
Expand Down Expand Up @@ -131,3 +133,7 @@ def test_call_download_atcoder_abc003_4(self):

def test_call_download_invalid_url(self):
self.snippet_call_download_raises(requests.exceptions.HTTPError, 'http://abc001.contest.atcoder.jp/tasks/abc001_100')

def test_call_download_413(self):
# This task is not supported.
self.snippet_call_download_raises(SampleParseError, 'https://chokudai001.contest.atcoder.jp/tasks/chokudai_001_a')

0 comments on commit 6ec3fdf

Please sign in to comment.