前回は単体テストの機能だったんですけど、今回は「ドキュメント兼テスト」です。 こちらの方がいいかもしれない。 関数「median」についてはこちらに解説しました。 まず、こちらのオレンジで囲んだ部分は全て文字列です。 わざとエラーケースで書かれ ...
そもそも、Web開発とかになれていないので、テストのありがたみとかよくわかってません(ぺろ) でも、pythonの基本コースには、こうゆう項目があるので、多分覚えておけばいいんだろうなと思う。 とりあえず、基本中の基本っぽい、doctestについて整理し ...
This extension allows you to test snippets in the documentation in a natural way. It works by collecting specially-marked up code blocks and running them as doctest tests. When building the docs with ...
===== FAIL: Doctest: nibabel.affines.apply_affine ----- Traceback (most recent call last): File "C:\Python32\Lib\doctest.py", line 2153, in runTest raise self ...