Results of 1 - 10 of about 237 for once (0.057 sec.)
- unittest.mock --- モックオブジェクトライブラリ — Python 3.14.8 ドキュメント 11260
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- モックオブジェクトライブラリ テーマ 自動 ライト ダーク | unittest.mock --- モックオブジェクトライブラ
...one ) as mock_method : ... thing = ProductionClass () ... thing . method ( 1 , 2 , 3 ) ... >>> mock_method . assert_called_once_with ( 1 , 2 , 3 ) また、 patch.dict() を使うと、スコープ内だけで辞書に値を設定し、テスト終了時には元の状態に復元されます:...e_autospec ( function , return_value = 'fishy' ) >>> mock_function ( 1 , 2 , 3 ) 'fishy' >>> mock_function . assert_called_once_with ( 1 , 2 , 3 ) >>> mock_function ( 'wrong arguments' ) Traceback (most recent call last): ... TypeError : missing a re.... method () <Mock name='mock.method()' id='...'> >>> mock . method . assert_called () Added in version 3.6. assert_called_once ( ) ¶ モックが一度だけ呼び出されたことをアサートします。 >>> mock = Mock () >>> mock . method () <Mock name='mock.method()... - https://man.mtool.work/python/3.14/library/unittest.mock.html
- unittest.mock --- モックオブジェクトライブラリ — Python 3.14.8 ドキュメント 10994
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- モックオブジェクトライブラリ テーマ 自動 ライト ダーク | unittest.mock --- モックオブジェクトライブラ
...one ) as mock_method : ... thing = ProductionClass () ... thing . method ( 1 , 2 , 3 ) ... >>> mock_method . assert_called_once_with ( 1 , 2 , 3 ) また、 patch.dict() を使うと、スコープ内だけで辞書に値を設定し、テスト終了時には元の状態に復元されます:...e_autospec ( function , return_value = 'fishy' ) >>> mock_function ( 1 , 2 , 3 ) 'fishy' >>> mock_function . assert_called_once_with ( 1 , 2 , 3 ) >>> mock_function ( 'wrong arguments' ) Traceback (most recent call last): ... TypeError : missing a re.... method () <Mock name='mock.method()' id='...'> >>> mock . method . assert_called () Added in version 3.6. assert_called_once ( ) ¶ モックが一度だけ呼び出されたことをアサートします。 >>> mock = Mock () >>> mock . method () <Mock name='mock.method()... - https://man.mtool.work/python/3.14/library/unittest.mock.html
- 変更履歴 — Python 3.14.8 ドキュメント 8618
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » What's New in Python » 変更履歴 テーマ 自動 ライト ダーク | 変更履歴 ¶ Python next ¶ Release date: XXXX-XX-XX セキュリティ ¶ gh-157265 : In tarfile , when extrac
...await-graph when racing a future that never resolves. The waiting task is now discarded from every future's awaited_by set once wait() returns, even for pending futures. gh-78335 : Update the docstrings of tkinter and tkinter.ttk widget classes to li...l due to missing NULL check on _unpack_args C function call. gh-149590 : Fix crash when faulthandler is imported more than once. gh-149816 : Fix a race condition in _PyBytes_FromList in free-threading mode. gh-149816 : Fix a race condition in memoryv...t method globally. gh-133253 : Fix thread-safety issues in linecache . gh-132715 : Skip writing objects during marshalling once a failure has occurred. IDLE ¶ gh-143774 : Better explain the operation of Format / Format Paragraph. ドキュメント ¶ gh-14... - https://man.mtool.work/python/3.14/whatsnew/changelog.html
- timer file descriptor HOWTO — Python 3.14.8 ドキュメント 8485
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » timer file descriptor HOWTO テーマ 自動 ライト ダーク | timer file descriptor HOWTO ¶ リリース : 1.13 This HOWTO discusses Python's support for th
...et the file descriptors. events = ep . poll ( timeout ) # If more than one timer file descriptors are ready for reading at once, # epoll.poll() returns a list of (fd, event) pairs. # # In this example settings, # 1st timer fires every 0.25 seconds in...(0.75, 1.5, 2.25, 3.0, ...) # # In 0.25 seconds, only 1st timer fires. # In 0.5 seconds, 1st timer and 2nd timer fires at once. # In 0.75 seconds, 1st timer and 3rd timer fires at once. # In 1.5 seconds, 1st timer, 2nd timer and 3rd timer fires at o...nce. # # If a timer file descriptor is signaled more than once since # the last os.read() call, os.read() returns the number of signaled # as host order of class bytes. print ( f "Signa... - https://man.mtool.work/python/3.14/howto/timerfd.html
- Logging クックブック — Python 3.14.8 ドキュメント 8353
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » Logging クックブック テーマ 自動 ライト ダーク | Logging クックブック ¶ Author : Vinay Sajip <vinay_sajip at red-dove dot com> このページは、過去に
...The queue listener automatically starts # when the 'with' block is entered. pass # The queue listener automatically stops once # the 'with' block is exited. ネットワーク越しの logging イベントの送受信 ¶ ログイベントをネットワーク越しに送信し、受信端...et = logger_thread , args = ( q ,)) lp . start () # At this point, the main process could do some useful work of its own # Once it's done that, it can wait for the workers to terminate... for wp in workers : wp . join () # And now tell the logging th...addHandler ( logging . StreamHandler ()) logger . setLevel ( logging . INFO ) logger . info ( '1. This should appear just once on stderr.' ) logger . debug ( '2. This should not appear.' ) with LoggingContext ( logger , level = logging . DEBUG ): lo... - https://man.mtool.work/python/3.14/howto/logging-cookbook.html
- unittest.mock --- 入門 — Python 3.14.8 ドキュメント 8220
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- 入門 テーマ 自動 ライト ダーク | unittest.mock --- 入門 ¶ Added in version 3.3. Mock を使う ¶ Mock p
...いいでしょう。 モックが呼び出されると、その called 属性が True に設定されます。そして assert_called_with() や assert_called_once_with() メソッドを使ってそのメソッドが正しい引数で呼び出されたかどうかをチェックできます。 次の例では ProductionClass().met...>> real = ProductionClass () >>> real . something = MagicMock () >>> real . method () >>> real . something . assert_called_once_with ( 1 , 2 , 3 ) Mock for method calls on an object ¶ 上の例ではオブジェクトのメソッドに対して直接パッチを当てて、それが...c with mock_instance as result : ... pass ... >>> asyncio . run ( main ()) >>> mock_instance . __aenter__ . assert_awaited_once () >>> mock_instance . __aexit__ . assert_awaited_once () Creating a mock from an existing object ¶ mock を使いすぎることの... - https://man.mtool.work/python/3.14/library/unittest.mock-examples.html
- unittest.mock --- 入門 — Python 3.14.8 ドキュメント 8220
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » The Python standard library » 開発ツール » unittest.mock --- 入門 テーマ 自動 ライト ダーク | unittest.mock --- 入門 ¶ Added in version 3.3. Mock を使う ¶ Mock p
...いいでしょう。 モックが呼び出されると、その called 属性が True に設定されます。そして assert_called_with() や assert_called_once_with() メソッドを使ってそのメソッドが正しい引数で呼び出されたかどうかをチェックできます。 次の例では ProductionClass().met...>> real = ProductionClass () >>> real . something = MagicMock () >>> real . method () >>> real . something . assert_called_once_with ( 1 , 2 , 3 ) Mock for method calls on an object ¶ 上の例ではオブジェクトのメソッドに対して直接パッチを当てて、それが...c with mock_instance as result : ... pass ... >>> asyncio . run ( main ()) >>> mock_instance . __aenter__ . assert_awaited_once () >>> mock_instance . __aexit__ . assert_awaited_once () Creating a mock from an existing object ¶ mock を使いすぎることの... - https://man.mtool.work/python/3.14/library/unittest.mock-examples.html
- Logging クックブック — Python 3.14.8 ドキュメント 7955
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » Logging クックブック テーマ 自動 ライト ダーク | Logging クックブック ¶ Author : Vinay Sajip <vinay_sajip at red-dove dot com> このページは、過去に
...The queue listener automatically starts # when the 'with' block is entered. pass # The queue listener automatically stops once # the 'with' block is exited. ネットワーク越しの logging イベントの送受信 ¶ ログイベントをネットワーク越しに送信し、受信端...et = logger_thread , args = ( q ,)) lp . start () # At this point, the main process could do some useful work of its own # Once it's done that, it can wait for the workers to terminate... for wp in workers : wp . join () # And now tell the logging th...addHandler ( logging . StreamHandler ()) logger . setLevel ( logging . INFO ) logger . info ( '1. This should appear just once on stderr.' ) logger . debug ( '2. This should not appear.' ) with LoggingContext ( logger , level = logging . DEBUG ): lo... - https://man.mtool.work/python/3.14/howto/logging-cookbook.html
- timer file descriptor HOWTO — Python 3.14.8 ドキュメント 7690
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » timer file descriptor HOWTO テーマ 自動 ライト ダーク | timer file descriptor HOWTO ¶ リリース : 1.13 This HOWTO discusses Python's support for th
...et the file descriptors. events = ep . poll ( timeout ) # If more than one timer file descriptors are ready for reading at once, # epoll.poll() returns a list of (fd, event) pairs. # # In this example settings, # 1st timer fires every 0.25 seconds in...(0.75, 1.5, 2.25, 3.0, ...) # # In 0.25 seconds, only 1st timer fires. # In 0.5 seconds, 1st timer and 2nd timer fires at once. # In 0.75 seconds, 1st timer and 3rd timer fires at once. # In 1.5 seconds, 1st timer, 2nd timer and 3rd timer fires at o...nce. # # If a timer file descriptor is signaled more than once since # the last os.read() call, os.read() returns the number of signaled # as host order of class bytes. print ( f "Signa... - https://man.mtool.work/python/3.14/howto/timerfd.html
- Remote debugging attachment protocol — Python 3.14.8 ドキュメント 7557
- ナビゲーション 索引 モジュール | 次へ | 前へ | Python » 3.14.8 Documentation » Python HOWTO » Remote debugging attachment protocol テーマ 自動 ライト ダーク | Remote debugging attachment protocol ¶ This protocol enables external tools to at
...ching a safe evaluation point. As a result, execution may be delayed depending on the runtime state of the target process. Once injected, the script is executed by the interpreter within the target process the next time a safe evaluation point is rea...ither administrative access or the SeDebugPrivilege privilege granted to the debugging process. Reading _Py_DebugOffsets ¶ Once the address of the PyRuntime structure has been determined, the next step is to read the _Py_DebugOffsets structure locate...s role or ID. In most cases, the main thread is used, but some tools may target a specific thread by its native thread ID. Once the target thread is chosen, the debugger must locate both the interpreter and the associated thread state structures in m... - https://man.mtool.work/python/3.14/howto/remote_debugging.html