Contents
""" 例題1 テストケースを記述してあります。 """ from nose.tools import ok_, eq_ import ex1 def add_test(): [docs] """ ex1.add test """ eq_(ex1.add(1, 2), 3) def sub_test(): [docs] """ ex1.sub test """ eq_(ex1.sub(1, 1), 0) def if_test(): [docs] """ if test """ ok_(1 == 1) def fail_test(): [docs] """ test fail """ # ok_(1 == '1', "失敗しました。") assert(1 == '1')