Python 3.6.5 ドキュメント 検索
Results of 1 - 10 of about 11 for TestCase (0.008 sec.)
- 26.4. unittest --- ユニットテストフレームワーク — Python 3.6.5 ドキュメント 14207
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ
...ィレクトリ・サーバプロセスの起動など。 テストケース (test case) テストケース ( test case ) はテストの独立した単位...。テストケースを作成する場合は、 unittest が提供する TestCase クラスを基底クラスとして利用することができます。 テ...port unittest class TestStringMethods ( unittest . TestCase ): def test_upper ( self ): self . assertEqual ( '...__' : unittest . main () テストケースは、 unittest.TestCase のサブクラスとして作成します。メソッド名が test で... - https://man.plustar.jp/python/library/unittest.html - [similar]
- 26.8. test --- Python 用回帰テストパッケージ — Python 3.6.5 ドキュメント 9833
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ
...: import unittest from test import support class MyTestCase1 ( unittest . TestCase ): # Only use setUp() and t...testing code ... ... more test methods ... class MyTestCase2 ( unittest . TestCase ): ... same structure as My...Lists ( TestFuncAcceptsSequencesMixin , unittest . TestCase ): arg = [ 1 , 2 , 3 ] class AcceptStrings ( TestF...uncAcceptsSequencesMixin , unittest . TestCase ): arg = 'abc' class AcceptTuples ( TestFuncAccept... - https://man.plustar.jp/python/library/test.html - [similar]
- 26.6. unittest.mock --- 入門 — Python 3.6.5 ドキュメント 9157
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ
...のは良いパターンです: >>> class MyTest ( unittest . TestCase ): ... @patch . object ( SomeClass , 'attribute' ,...メソッドに渡されます: >>> class MyTest ( unittest . TestCase ): ... @patch . object ( SomeClass , 'static_metho...重ねることができます: >>> class MyTest ( unittest . TestCase ): ... @patch ( 'package.module.ClassName1' ) ......@patch ( 'mymodule.SomeClass' ) ... class MyTest ( TestCase ): ... ... def test_one ( self , MockSomeClass ):... - https://man.plustar.jp/python/library/unittest.mock-examples.html - [similar]
- 26.5. unittest.mock --- モックオブジェクトライブラリ — Python 3.6.5 ドキュメン... 8304
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ
...りません。それはデフォルトで追加されます。 patch は TestCase のクラスデコレータとして利用できます。この場合その...is not new_mock この方式の典型的なユースケースは、 TestCase の setUp メソッドで複数のパッチを行うことです: >>>...class MyTest ( TestCase ): ... def setUp ( self ): ... self . patcher1 = p...呼び出されないので、これは意外に面倒です。 unittest.TestCase.addCleanup() を使うと簡単にできます: >>> class MyT... - https://man.plustar.jp/python/library/unittest.mock.html - [similar]
- What's New In Python 3.2 — Python 3.6.5 ドキュメント 8232
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho
...t.py (Contributed by Michael Foord.) unittest.case.TestCase クラスが引数なしでインスタンス化できるようになった...みるのが以前より簡単です。 >>> from unittest import TestCase >>> TestCase () . assertEqual ( pow ( 2 , 3 ), 8 )...tAlmostEqual() 同様に、Python 3.1 で非推奨になった TestCase.fail* メソッドは Python 3.3 で削除されるはずです。...もこれは引数順を誤って実装されていたからです。これは TestCase().assertDictContainsSubset({'a':1, 'b':2}, {'a':1}... - https://man.plustar.jp/python/whatsnew/3.2.html - [similar]
- 26.3. doctest --- 対話的な実行例をテストする — Python 3.6.5 ドキュメント 8037
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python 標準ライブラ
...を返します。 裏側では DocTestSuite() は doctest.DocTestCase インスタンスから unittest.TestSuite を作成しており...、 DocTestCase は unittest.TestCase のサブクラスになっています。...DocTestCase についてはここでは説明しません (これは内部実装上の...から unittest.TestSuite を作成し、 DocFileCase は DocTestCase のサブクラスになっています。 そのため、 unittest.T... - https://man.plustar.jp/python/library/doctest.html - [similar]
- 10. 標準ライブラリミニツアー — Python 3.6.5 ドキュメント 8037
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » Python チュートリア
...ittest class TestStatisticalFunctions ( unittest . TestCase ): def test_average ( self ): self . assertEqual (... - https://man.plustar.jp/python/tutorial/stdlib.html - [similar]
- What's New In Python 3.1 — Python 3.6.5 ドキュメント 8037
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho
...ウントされなくなります: class TestGizmo ( unittest . TestCase ): @unittest . skipUnless ( sys . platform . start... - https://man.plustar.jp/python/whatsnew/3.1.html - [similar]
- What's New In Python 3.3 — Python 3.6.5 ドキュメント 7966
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho
...Melotti and Winston Ewert in bpo-10775 .) unittest.TestCase.run() が TestResult オブジェクトを返すようになりま...削除されました。 非推奨となっていたメソッド unittest.TestCase.assertSameElements は削除されました。 非推奨となっ... - https://man.plustar.jp/python/whatsnew/3.3.html - [similar]
- What's New In Python 3.4 — Python 3.6.5 ドキュメント 7966
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.6.5 ドキュメント » What's New in Pytho
...ibuted by Berker Peksag in bpo-15701 .) unittest ¶ TestCase クラスに新規コンテキストマネージャ subTest() が追加...されます。例えば以下: class NumbersTest ( unittest . TestCase ): def test_even ( self ): for i in range ( 6 ): w... - https://man.plustar.jp/python/whatsnew/3.4.html - [similar]
