Skip to content

Commit

Permalink
#30 autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
kyuridenamida committed Dec 25, 2018
1 parent 505cb33 commit 3eaddb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion atcodertools/fmtprediction/predict_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class InvalidLoopIndexError(Exception):
pass


UP_CAST_TABLE = {int: {}, str: {}, float: {}} # type: Dict[type, Dict[type, type]]
UP_CAST_TABLE = {int: {}, str: {}, float: {}}
# type: Dict[type, Dict[type, type]]

UP_CAST_TABLE[int][int] = int
UP_CAST_TABLE[int][str] = str
Expand Down
10 changes: 7 additions & 3 deletions tests/test_fmtprediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ def test_overall(self):

for ans, out in zip(answer.split("\n"), output_text.split("\n")):
if ans != out:
case_name = ans.split()[0] # case name is expected to be stored to the first column in the file
# Case name is expected to be stored to the first column in the
# file.
case_name = ans.split()[0]
content = runner.load_problem_content(case_name)
logging.debug("=== {} ===".format(case_name))
logging.debug("Input Format:\n{}".format(content.input_format_text))
logging.debug(
"Input Format:\n{}".format(content.input_format_text))
for idx, s in enumerate(content.samples):
logging.debug("Sample Input {num}:\n{inp}".format(inp=s.get_input(), num=idx + 1))
logging.debug(
"Sample Input {num}:\n{inp}".format(inp=s.get_input(), num=idx + 1))
self.assertEqual(ans, out)

self.assertEqual(len(answer), len(output_text))
Expand Down

0 comments on commit 3eaddb2

Please sign in to comment.