per page, with , order by , clip by
Results of 1 - 10 of about 119 for side (0.011 sec.)
unittest.mock --- モックオブジェクトライブラリ — Python 3.14.8 ドキュメント 13292
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- モックオブジェクトライブラリ テーマ 自動 ライト ダーク | unittest.mock --- モックオブジェクトライブラ ... ) >>> thing . method ( 3 , 4 , 5 , key = 'value' ) 3 >>> thing . method . assert_called_with ( 3 , 4 , 5 , key = 'value' ) side_effect によって、モック呼び出し時の例外発生などの副作用を実行できます: >>> from unittest.mock import Mock >>> mock = Mock ... ( side_effect = KeyError ( 'foo' )) >>> mock () Traceback (most recent call last): ... KeyError : 'foo' >>> values = { 'a' : 1 , ... 'b' : 2 , 'c' : 3 } >>> def side_effect ( arg ): ... return values [ arg ] ... >>> mock . side_effect = side_effect >>> mock ( 'a' ), mock ( 'b' ), mock ( ...
https://man.mtool.work/python/3.14/library/unittest.mock.html
unittest.mock --- モックオブジェクトライブラリ — Python 3.14.8 ドキュメント 13292
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- モックオブジェクトライブラリ テーマ 自動 ライト ダーク | unittest.mock --- モックオブジェクトライブラ ... ) >>> thing . method ( 3 , 4 , 5 , key = 'value' ) 3 >>> thing . method . assert_called_with ( 3 , 4 , 5 , key = 'value' ) side_effect によって、モック呼び出し時の例外発生などの副作用を実行できます: >>> from unittest.mock import Mock >>> mock = Mock ... ( side_effect = KeyError ( 'foo' )) >>> mock () Traceback (most recent call last): ... KeyError : 'foo' >>> values = { 'a' : 1 , ... 'b' : 2 , 'c' : 3 } >>> def side_effect ( arg ): ... return values [ arg ] ... >>> mock . side_effect = side_effect >>> mock ( 'a' ), mock ( 'b' ), mock ( ...
https://man.mtool.work/python/3.14/library/unittest.mock.html
unittest.mock --- 入門 — Python 3.14.8 ドキュメント 10902
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- 入門 テーマ 自動 ライト ダーク | unittest.mock --- 入門 ¶ Added in version 3.3. Mock を使う ¶ Mock p ... expected True call object を chained call を表す list にするために .call_list() を使います。 モックから例外を発生させる ¶ side_effect という便利な属性があります。この属性に例外クラスやそのインスタンスを設定すると、モックが呼ばれた時にその例外を発生さ ... せます。 >>> mock = Mock ( side_effect = Exception ( 'Boom!' )) >>> mock () Traceback (most recent call last): ... Exception : Boom! side_effect の関数と ... iterable ¶ side_effect には関数や iterable を設定することもできます。 side_effect に iterable を設定するユースケースは、そのモックが複数回 ...
https://man.mtool.work/python/3.14/library/unittest.mock-examples.html
unittest.mock --- 入門 — Python 3.14.8 ドキュメント 10902
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- 入門 テーマ 自動 ライト ダーク | unittest.mock --- 入門 ¶ Added in version 3.3. Mock を使う ¶ Mock p ... expected True call object を chained call を表す list にするために .call_list() を使います。 モックから例外を発生させる ¶ side_effect という便利な属性があります。この属性に例外クラスやそのインスタンスを設定すると、モックが呼ばれた時にその例外を発生さ ... せます。 >>> mock = Mock ( side_effect = Exception ( 'Boom!' )) >>> mock () Traceback (most recent call last): ... Exception : Boom! side_effect の関数と ... iterable ¶ side_effect には関数や iterable を設定することもできます。 side_effect に iterable を設定するユースケースは、そのモックが複数回 ...
https://man.mtool.work/python/3.14/library/unittest.mock-examples.html
traceback --- スタックトレースの表示または取得 — Python 3.14.8 ドキュメント 9035
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » traceback --- スタックトレースの表示または取得 テーマ 自動 ライト ダーク | traceback --- スタックトレー ... dir ) 次の例は例外とトレースバックの出力並びに形式が異なることを示します: import sys , traceback def lumberjack (): bright_side_of_life () def bright_side_of_life (): return tuple ()[ 0 ] try : lumberjack () except IndexError as exc : print ( "*** pr ... st): File "<doctest...>", line 10, in <module> lumberjack() ~~~~~~~~~~^^ File "<doctest...>", line 4, in lumberjack bright_side_of_life() ~~~~~~~~~~~~~~~~~~~^^ IndexError: tuple index out of range *** print_exc: Traceback (most recent call last): Fil ... e "<doctest...>", line 10, in <module> lumberjack() ~~~~~~~~~~^^ File "<doctest...>", line 4, in lumberjack bright_side_of_life() ~~~~~~~~~~~~~~~~~~~^^ IndexError: tuple index out of range *** format_exc, first and last line: Traceback (most ...
https://man.mtool.work/python/3.14/library/traceback.html
traceback --- スタックトレースの表示または取得 — Python 3.14.8 ドキュメント 9035
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » Python ランタイムサービス » traceback --- スタックトレースの表示または取得 テーマ 自動 ライト ダーク | traceback --- スタックトレー ... dir ) 次の例は例外とトレースバックの出力並びに形式が異なることを示します: import sys , traceback def lumberjack (): bright_side_of_life () def bright_side_of_life (): return tuple ()[ 0 ] try : lumberjack () except IndexError as exc : print ( "*** pr ... st): File "<doctest...>", line 10, in <module> lumberjack() ~~~~~~~~~~^^ File "<doctest...>", line 4, in lumberjack bright_side_of_life() ~~~~~~~~~~~~~~~~~~~^^ IndexError: tuple index out of range *** print_exc: Traceback (most recent call last): Fil ... e "<doctest...>", line 10, in <module> lumberjack() ~~~~~~~~~~^^ File "<doctest...>", line 4, in lumberjack bright_side_of_life() ~~~~~~~~~~~~~~~~~~~^^ IndexError: tuple index out of range *** format_exc, first and last line: Traceback (most ...
https://man.mtool.work/python/3.14/library/traceback.html
ssl --- ソケットオブジェクト用の TLS/SSL ラッパー — Python 3.14.8 ドキュメント 8102
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » ssl --- ソケットオブジェクト用の TLS/SSL ラッパー テーマ 自動 ライト ダーク | ssl --- ソケットオ ... ity (often known as "Secure Sockets Layer") encryption and peer authentication facilities for network sockets, both client-side and server-side. This module uses the OpenSSL library. This is an optional module . If it is missing from your copy of CPy ... r the socket with SSL. It supports additional methods such as getpeercert() , which retrieves the certificate of the other side of the connection, cipher() , which retrieves the cipher being used for the secure connection or get_verified_chain() , ge ... STREAM , 0 ) as sock : sock . bind (( '127.0.0.1' , 8443 )) sock . listen ( 5 ) with context . wrap_socket ( sock , server_side = True ) as ssock : conn , addr = ssock . accept () ... コンテキストの作成 ¶ コンビニエンス関数が、共通の目的で使用される ...
https://man.mtool.work/python/3.14/library/ssl.html
ssl --- ソケットオブジェクト用の TLS/SSL ラッパー — Python 3.14.8 ドキュメント 8102
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » ネットワーク通信とプロセス間通信 » ssl --- ソケットオブジェクト用の TLS/SSL ラッパー テーマ 自動 ライト ダーク | ssl --- ソケットオ ... ity (often known as "Secure Sockets Layer") encryption and peer authentication facilities for network sockets, both client-side and server-side. This module uses the OpenSSL library. This is an optional module . If it is missing from your copy of CPy ... r the socket with SSL. It supports additional methods such as getpeercert() , which retrieves the certificate of the other side of the connection, cipher() , which retrieves the cipher being used for the secure connection or get_verified_chain() , ge ... STREAM , 0 ) as sock : sock . bind (( '127.0.0.1' , 8443 )) sock . listen ( 5 ) with context . wrap_socket ( sock , server_side = True ) as ssock : conn , addr = ssock . accept () ... コンテキストの作成 ¶ コンビニエンス関数が、共通の目的で使用される ...
https://man.mtool.work/python/3.14/library/ssl.html
参照カウント — Python 3.14.8 ドキュメント 7168
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 参照カウント テーマ 自動 ライト ダーク | 参照カウント ¶ このセクションにある関数とマクロは、 Python オブジェクトの参照カウントの管 ... rsed during garbage collection. バージョン 3.12 で変更: The macro argument is now only evaluated once. If the argument has side effects, these are no longer duplicated. void Py_IncRef ( PyObject * o ) ¶ 次に属します: Stable ABI . Indicate taking a ne ... ; That arranges to set dst to src before releasing the reference to the old value of dst , so that any code triggered as a side-effect of dst getting torn down no longer believes dst points to a valid object. Added in version 3.6. バージョン 3.12 で変 ... 更: The macro arguments are now only evaluated once. If an argument has side effects, these are no longer duplicated. Py_XSETREF ( dst , src ) ¶ Variant of Py_SETREF macro that uses Py_XDECREF() inst ...
https://man.mtool.work/python/3.14/c-api/refcounting.html
開発ツール — Python 3.14.8 ドキュメント 6994
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール テーマ 自動 ライト ダーク | 開発ツール ¶ この章で紹介されるモジュールはソフトウェアを書くことを支援します。たとえば、 py ... ヘルパー sentinel DEFAULT call create_autospec ANY FILTER_DIR mock_open autospec を使う Sealing mocks Order of precedence of side_effect , return_value and wraps unittest.mock --- 入門 Mock を使う Mock patching methods Mock for method calls on an objec ... t Mocking classes モックに名前をつける Tracking all calls Setting return values and attributes モックから例外を発生させる side_effect の関数と iterable 非同期イテレータをモックする 非同期コンテキストマネージャをモックする Creating a mock from an exi ... sting object Using side_effect to return per file content Patch decorators Further examples chained call をモックする 部分的なモック Mocking a gen ...
https://man.mtool.work/python/3.14/library/development.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT