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