per page, with , order by , clip by
Results of 1 - 2 of about 2 for testfile (0.004 sec.)
doctest --- 対話型の Python の例をテストする 11228
doctest --- 対話型の Python の例をテストする ソースコード: Lib/doctest.py doctest モジュールは Python の対話セッションに見えるテキストを探し、そのセッションを実行して記載どおりに動作するか検証します。 主な使い方は次のとおりです。 モジュール ... ル中の実行例をチェックする doctest のもう一つの簡単な用途は、テキストファイル中にある対話実行例に対するテストです。これには testfile() 関数を使います: import doctest doctest . testfile ( "example.txt" ) この短いスクリプトは、 example.txt というファイルの中 ... ら ``factorial`` をインポートします: >>> from example import factorial 次に、使ってみましょう: >>> factorial(6) 120 doctest.testfile("example.txt") を実行すると、このドキュメント内のエラーを見つけ出します: File "./example.txt" , line 14 , in example . txt ... Failed example : factorial ( 6 ) Expected : 120 Got : 720 testmod() と同じく、 testfile() は実行例が失敗しない限り何も表示しません。実行例が失敗すると、失敗した実行例とその原因が (場合によっては複数) testmod() ...
https://man.mtool.work/python/3.14/library/doctest.html
What's New in Python 2.5 7485
What's New in Python 2.5 著者 : A.M. Kuchling この記事では Python 2.5 の新機能を説明します。 Python 2.5 の最終リリースは 2006 年 8 月に予定されており、 PEP 356 にリリース計画が記載されています。 Python 2.5 は 2006 年 9 月 19 日にリリースされ ... 実際のテストケースとして意図していないようなコードスニペットのために用意されました。 An encoding parameter was added to the testfile() function and the DocFileSuite class to specify the file's encoding. This makes it easier to use non-ASCII characters in ...
https://man.mtool.work/python/3.14/whatsnew/2.5.html
PREV 1 NEXT