per page, with , order by , clip by
Results of 1 - 10 of about 432 for called (0.037 sec.)
unittest.mock --- モックオブジェクトライブラリ — Python 3.14.8 ドキュメント 9154
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- モックオブジェクトライブラリ テーマ 自動 ライト ダーク | unittest.mock --- モックオブジェクトライブラ ... te. After performing an action, you can make assertions about which methods / attributes were used and arguments they were called with. You can also specify return values and set needed attributes in the normal way. 加えて、 mock はテストのスコープ内に ... g . method = MagicMock ( return_value = 3 ) >>> thing . method ( 3 , 4 , 5 , key = 'value' ) 3 >>> thing . method . assert_called_with ( 3 , 4 , 5 , key = 'value' ) side_effect によって、モック呼び出し時の例外発生などの副作用を実行できます: >>> from un ... Name2 () ... assert MockClass1 is module . ClassName1 ... assert MockClass2 is module . ClassName2 ... assert MockClass1 . called ... assert MockClass2 . called ... >>> test () 注釈 patch デコレータをネストした場合、モックは適用されるときと同じ順番 (デ ...
https://man.mtool.work/python/3.14/library/unittest.mock.html
unittest.mock --- モックオブジェクトライブラリ — Python 3.14.8 ドキュメント 9154
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- モックオブジェクトライブラリ テーマ 自動 ライト ダーク | unittest.mock --- モックオブジェクトライブラ ... te. After performing an action, you can make assertions about which methods / attributes were used and arguments they were called with. You can also specify return values and set needed attributes in the normal way. 加えて、 mock はテストのスコープ内に ... g . method = MagicMock ( return_value = 3 ) >>> thing . method ( 3 , 4 , 5 , key = 'value' ) 3 >>> thing . method . assert_called_with ( 3 , 4 , 5 , key = 'value' ) side_effect によって、モック呼び出し時の例外発生などの副作用を実行できます: >>> from un ... Name2 () ... assert MockClass1 is module . ClassName1 ... assert MockClass2 is module . ClassName2 ... assert MockClass1 . called ... assert MockClass2 . called ... >>> test () 注釈 patch デコレータをネストした場合、モックは適用されるときと同じ順番 (デ ...
https://man.mtool.work/python/3.14/library/unittest.mock.html
unittest.mock --- 入門 — Python 3.14.8 ドキュメント 8661
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- 入門 テーマ 自動 ライト ダーク | unittest.mock --- 入門 ¶ Added in version 3.3. Mock を使う ¶ Mock p ... MagicMock は互換です。 MagicMock の方が強力なので、デフォルトではこちらを使うといいでしょう。 モックが呼び出されると、その called 属性が True に設定されます。そして assert_called_with() や assert_called_once_with() メソッドを使ってそのメソッドが正しい引 ... s ... >>> real = ProductionClass () >>> real . something = MagicMock () >>> real . method () >>> real . something . assert_called_once_with ( 1 , 2 , 3 ) Mock for method calls on an object ¶ 上の例ではオブジェクトのメソッドに対して直接パッチを当てて、そ ... しなければなりません。 >>> real = ProductionClass () >>> mock = Mock () >>> real . closer ( mock ) >>> mock . close . assert_called_with () モックに close メソッドを持たせるために何か準備する必要はありません。 close メソッドにアクセスすると自動的にそれが ...
https://man.mtool.work/python/3.14/library/unittest.mock-examples.html
unittest.mock --- 入門 — Python 3.14.8 ドキュメント 8569
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- 入門 テーマ 自動 ライト ダーク | unittest.mock --- 入門 ¶ Added in version 3.3. Mock を使う ¶ Mock p ... MagicMock は互換です。 MagicMock の方が強力なので、デフォルトではこちらを使うといいでしょう。 モックが呼び出されると、その called 属性が True に設定されます。そして assert_called_with() や assert_called_once_with() メソッドを使ってそのメソッドが正しい引 ... s ... >>> real = ProductionClass () >>> real . something = MagicMock () >>> real . method () >>> real . something . assert_called_once_with ( 1 , 2 , 3 ) Mock for method calls on an object ¶ 上の例ではオブジェクトのメソッドに対して直接パッチを当てて、そ ... しなければなりません。 >>> real = ProductionClass () >>> mock = Mock () >>> real . closer ( mock ) >>> mock . close . assert_called_with () モックに close メソッドを持たせるために何か準備する必要はありません。 close メソッドにアクセスすると自動的にそれが ...
https://man.mtool.work/python/3.14/library/unittest.mock-examples.html
変更履歴 — Python 3.14.8 ドキュメント 8527
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » 変更履歴 テーマ 自動 ライト ダーク | 変更履歴 ¶ Python next ¶ Release date: XXXX-XX-XX セキュリティ ¶ gh-157265 : In tarfile , when extrac ... ting a link falls back to extracting a member of the archive, skip the member when the filter function returns None when called with the extracted member's name replaced with the link's. Core and Builtins ¶ gh-158583 : bytes.fromhex() and bytearray.f ... to match any scheme. Core and Builtins ¶ gh-158364 : Fix crash when sys._current_frames() or sys._current_exceptions() is called while another interpreter is running. gh-158254 : Reverse iterators over a dict and its views now raise RuntimeError if th ... ed behaviour in operator.methodcaller : its tp_clear slot function returned void instead of int , so the garbage collector called it through an incompatible function type. Patched by Shamil Abdulaev. gh-157377 : Fix gc.get_count() on the free-threaded ...
https://man.mtool.work/python/3.14/whatsnew/changelog.html
Curses C API — Python 3.14.8 ドキュメント 7851
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » Curses C API テーマ 自動 ライト ダーク | Curses C API ¶ curses exposes a small C inte ... e compatible with subinterpreters. import_curses ( ) ¶ Import the curses C API. The macro does not need a semi-colon to be called. On success, populate the PyCurses_API pointer. On failure, set PyCurses_API to NULL and set an exception. The caller must ... . PyCurses_API[1] , PyCurses_API[2] , and PyCurses_API[3] are pointers to predicate functions of type int (*)(void) . When called, these predicates return whether curses.setupterm() , curses.initscr() , and curses.start_color() have been called respect ... ively. See also the convenience macros PyCursesSetupTermCalled , PyCursesInitialised , and PyCursesInitialisedColor . 注釈 The number of entries in this structure is subject to changes. ...
https://man.mtool.work/python/3.14/c-api/curses.html
Curses C API — Python 3.14.8 ドキュメント 7851
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » 具象オブジェクト (concrete object) レイヤ » Curses C API テーマ 自動 ライト ダーク | Curses C API ¶ curses exposes a small C inte ... e compatible with subinterpreters. import_curses ( ) ¶ Import the curses C API. The macro does not need a semi-colon to be called. On success, populate the PyCurses_API pointer. On failure, set PyCurses_API to NULL and set an exception. The caller must ... . PyCurses_API[1] , PyCurses_API[2] , and PyCurses_API[3] are pointers to predicate functions of type int (*)(void) . When called, these predicates return whether curses.setupterm() , curses.initscr() , and curses.start_color() have been called respect ... ively. See also the convenience macros PyCursesSetupTermCalled , PyCursesInitialised , and PyCursesInitialisedColor . 注釈 The number of entries in this structure is subject to changes. ...
https://man.mtool.work/python/3.14/c-api/curses.html
インタープリタの初期化と終了処理 — Python 3.14.8 ドキュメント 6723
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » インタープリタの初期化と終了処理 テーマ 自動 ライト ダーク | インタープリタの初期化と終了処理 ¶ See Python Initialization Configu ... to initialization. Before Python initialization ¶ In an application embedding Python, the Py_Initialize() function must be called before using any other Python/C API functions; with the exception of a few functions and the global configuration variable ... lock() 注釈 Despite their apparent similarity to some of the functions listed above, the following functions should not be called before the interpreter has been initialized: Py_EncodeLocale() , PyEval_InitThreads() , and Py_RunMain() . グローバルな設定 ... ize ( ) ¶ 次に属します: Stable ABI . Initialize the Python interpreter. In an application embedding Python, this should be called before using any other Python/C API functions; see Before Python Initialization for the few exceptions. This initializes t ...
https://man.mtool.work/python/3.14/c-api/interp-lifecycle.html
インタープリタの初期化と終了処理 — Python 3.14.8 ドキュメント 6631
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » インタープリタの初期化と終了処理 テーマ 自動 ライト ダーク | インタープリタの初期化と終了処理 ¶ See Python Initialization Configu ... to initialization. Before Python initialization ¶ In an application embedding Python, the Py_Initialize() function must be called before using any other Python/C API functions; with the exception of a few functions and the global configuration variable ... lock() 注釈 Despite their apparent similarity to some of the functions listed above, the following functions should not be called before the interpreter has been initialized: Py_EncodeLocale() , PyEval_InitThreads() , and Py_RunMain() . グローバルな設定 ... ize ( ) ¶ 次に属します: Stable ABI . Initialize the Python interpreter. In an application embedding Python, this should be called before using any other Python/C API functions; see Before Python Initialization for the few exceptions. This initializes t ...
https://man.mtool.work/python/3.14/c-api/interp-lifecycle.html
Thread states and the global interpreter lock — Python 3.14.8 ドキュメント 6631
ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python/C API reference manual » Thread states and the global interpreter lock テーマ 自動 ライト ダーク | Thread states and the global interpreter lock ¶ Unless ... ython interpreter is generally not thread-safe. In order to support multi-threaded Python programs, there's a global lock, called the global interpreter lock or GIL , that must be held by a thread before accessing Python objects. Without the lock, even ... is done by detaching the thread state . The Python interpreter keeps some thread-local information inside a data structure called PyThreadState , known as a thread state . Each thread has a thread-local pointer to a PyThreadState ; a thread state refer ... ons work: The attached thread state implies that the GIL is held for the interpreter. To detach it, PyEval_SaveThread() is called and the result is stored in a local variable. By detaching the thread state, the GIL is released, which allows other threa ...
https://man.mtool.work/python/3.14/c-api/threads.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT