diff --git a/library/unittest.mock-examples.po b/library/unittest.mock-examples.po index f5a9138090..5a1af56ac2 100644 --- a/library/unittest.mock-examples.po +++ b/library/unittest.mock-examples.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-09-09 00:03+0000\n" -"PO-Revision-Date: 2024-04-09 00:31+0800\n" +"PO-Revision-Date: 2024-05-06 08:22+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.4.1\n" +"X-Generator: Poedit 3.4.2\n" #: ../../library/unittest.mock-examples.rst:2 msgid ":mod:`unittest.mock` --- getting started" @@ -1057,8 +1057,8 @@ msgid "" "*spec* (or *spec_set*) argument so that the ``MagicMock`` created only has " "dictionary magic methods available:" msgstr "" -"*第三個*\\ 選擇是使用 ``MagicMock``,但傳入 ``dict`` 作為 *spec*(或" -"*spec_set*)引數,以使被建立的 ``MagicMock`` 僅具有字典可用的魔術方法:" +"*第三個*\\ 選擇是使用 ``MagicMock``,但傳入 ``dict`` 作為 *spec* (或 " +"*spec_set*\\ )引數,以使被建立的 ``MagicMock`` 僅具有字典可用的魔術方法:" #: ../../library/unittest.mock-examples.rst:1034 msgid "" @@ -1121,7 +1121,7 @@ msgid "" "signature is that it takes arbitrary keyword arguments (``**kwargs``) which " "are then passed onto the mock constructor:" msgstr "" -"``Mock``(及其各種形式)使用名為 ``_get_child_mock`` 的方法來為屬性和回傳值" +"``Mock`` (及其各種形式)使用名為 ``_get_child_mock`` 的方法來為屬性和回傳值" "建立這些 \"子 mock\"。你可以透過置換此方法來防止你的子類別被用為屬性。其簽名" "是取用任意的關鍵字引數(``**kwargs``\\ ),然後將其傳遞給 mock 建構函式:" @@ -1280,8 +1280,8 @@ msgid "" "about the order. In this case you can pass ``any_order=True`` to " "``assert_has_calls``:" msgstr "" -"有時可能會對一個 mock 進行多次呼叫,而你只對斷言其中\\ *某些*\\ 呼叫感興趣。你" -"甚至可能不關心順序。在這種情況下,你可以將 ``any_order=True`` 傳遞給 " +"有時可能會對一個 mock 進行多次呼叫,而你只對斷言其中\\ *某些*\\ 呼叫感興趣。" +"你甚至可能不關心順序。在這種情況下,你可以將 ``any_order=True`` 傳遞給 " "``assert_has_calls``:" #: ../../library/unittest.mock-examples.rst:1271 @@ -1305,8 +1305,8 @@ msgid "" "attributes of this object then we can create a matcher that will check these " "attributes for us." msgstr "" -"假設我們預期某個物件會被傳進 mock,預設情況下,該 mock 會根據物件識別性" -"進行相等比較(對使用者定義類別的 Python 預設行為)。要使用 :meth:`~Mock." +"假設我們預期某個物件會被傳進 mock,預設情況下,該 mock 會根據物件識別性進行相" +"等比較(對使用者定義類別的 Python 預設行為)。要使用 :meth:`~Mock." "assert_called_with`,我們需要傳入完全相同的物件。如果我們只對該物件的某些屬性" "感興趣,那麼我們可以建立一個匹配器來為我們檢查這些屬性。" @@ -1342,9 +1342,10 @@ msgid "" "raised:" msgstr "" "``Matcher`` 是用我們想要比較的 ``Foo`` 物件和比較函式實例化的。在 " -"``assert_called_with`` 中,``Matcher`` 相等方法將被呼叫,它將呼叫 mock 時傳入的物件" -"與我們建立匹配器時傳入的物件進行比較。如果它們匹配,則 ``assert_called_with`` 會通" -"過,如果它們不匹配,則會引發 :exc:`AssertionError`:" +"``assert_called_with`` 中,``Matcher`` 相等方法將被呼叫,它將呼叫 mock 時傳入" +"的物件與我們建立匹配器時傳入的物件進行比較。如果它們匹配,則 " +"``assert_called_with`` 會通過,如果它們不匹配,則會引發 :exc:" +"`AssertionError`:" #: ../../library/unittest.mock-examples.rst:1339 msgid "" @@ -1363,7 +1364,7 @@ msgid "" "integration/#module-hamcrest.library.integration.match_equality>`_)." msgstr "" "從版本 1.5 開始,Python 測試函式庫 `PyHamcrest `_ 以其相等匹配器的形式,提供了類似的功能,在這裡可能是有用的 " -"(\\ `hamcrest.library.integration.match_equality `_ 以其相等匹配器的形式,提供了類似的功能,在這裡可能是有用" +"的 (\\ `hamcrest.library.integration.match_equality `_\\ )。"