@@ -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-01-23 18:41 +0800\n "
11+ "PO-Revision-Date :2024-01-24 18:12 +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 "
@@ -455,7 +455,7 @@ msgstr ""
455455#: ../../library/unittest.mock-examples.rst:439
456456msgid ""
457457"The module name can be 'dotted', in the form ``package.module`` if needed::"
458- msgstr "如有需要,模組名稱可以含有 ``.``,形式為“ package.module” : ::"
458+ msgstr "如有需要,模組名稱可以含有 ``.``,形式為`` package.module`` : ::"
459459
460460#: ../../library/unittest.mock-examples.rst:448
461461msgid "A nice pattern is to actually decorate test methods themselves:"
@@ -482,9 +482,9 @@ msgid ""
482482"decorators are applied). This means from the bottom up, so in the example "
483483"above the mock for ``test_module.ClassName2`` is passed in first."
484484msgstr ""
485- "當你巢狀使用 patch 裝飾器時,mock會以被應用的順序傳遞到裝飾函數(裝飾器應用 "
486- "的正常 *Python*順序 )。這意味著由下而上,因此在上面的範例中, \\ ``module. "
487- "ClassName2`` 的 mock 會先被傳入。"
485+ "當你巢狀使用 patch 裝飾器時,mock傳遞到被裝飾函式的順序會跟其被應用的順序相 "
486+ "同(一般 *Python*應用裝飾器的順序 )。這意味著由下而上,因此在上面的範例 "
487+ "中, \\ ``module. ClassName2`` 的 mock 會先被傳入。"
488488
489489#: ../../library/unittest.mock-examples.rst:487
490490msgid ""
@@ -517,11 +517,11 @@ msgid ""
517517"decorator individually to every method whose name starts with\" test\" ."
518518msgstr ""
519519"另外,“patch”、“patch.object” 和 “patch.dict” 也可以用來作為類別裝飾器。以這"
520- "種方式使用時,與將裝飾器單獨應用於名稱以 “test”開頭的每個方法相同 。"
520+ "種方式使用時,與將裝飾器單獨應用於每個名稱以 “test”開頭的方法相同 。"
521521
522522#: ../../library/unittest.mock-examples.rst:523
523523msgid "Further Examples"
524- msgstr "更多例子 "
524+ msgstr "更多範例 "
525525
526526#: ../../library/unittest.mock-examples.rst:526
527527msgid "Here are some more examples for some slightly more advanced scenarios."
@@ -538,7 +538,7 @@ msgid ""
538538"for the first time, or you fetch its ``return_value`` before it has been "
539539"called, a new :class:`Mock` is created."
540540msgstr ""
541- "一旦你了解了 :attr:`~Mock.return_value` 屬性,mock鏈接呼叫其實就很簡單了 。當"
541+ "一旦你了解了 :attr:`~Mock.return_value` 屬性,mock鍊接呼叫其實就很簡單了 。當"
542542"一個 mock 第一次被呼叫,或者你在它被呼叫之前取得其 ``return_value`` 時,一個"
543543"新的 :class:`Mock` 就會被建立。"
544544
@@ -547,17 +547,17 @@ msgid ""
547547"This means that you can see how the object returned from a call to a mocked "
548548"object has been used by interrogating the ``return_value`` mock:"
549549msgstr ""
550- "這代表你可以透過訊問 (interrogate) \\ ``return_value`` mock 來了解一個對被 "
551- "mock 的物件的呼叫回傳的物件是如何被使用的 :"
550+ "這代表你可以透過查問 ``return_value`` mock 來了解一個對被mock 的物件的呼叫回 "
551+ "傳的物件是如何被使用的 :"
552552
553553#: ../../library/unittest.mock-examples.rst:545
554554msgid ""
555555"From here it is a simple step to configure and then make assertions about "
556556"chained calls. Of course another alternative is writing your code in a more "
557557"testable way in the first place..."
558558msgstr ""
559- "從這裡開始,只需一個簡單的步驟即可進行配置並對鍊接呼叫進行斷言 。當然,另一種 "
560- "選擇是先以更容易被測試的方式撰寫程式碼 ..."
559+ "這裡只需一個簡單的步驟即可進行配置並對鍊接呼叫進行斷言 。當然,另一種選擇是先 "
560+ "以更容易被測試的方式撰寫程式碼 ..."
561561
562562#: ../../library/unittest.mock-examples.rst:549
563563msgid "So, suppose we have some code that looks a little bit like this:"
@@ -569,7 +569,7 @@ msgid ""
569569"``method()``? Specifically, we want to test that the code section ``# more "
570570"code`` uses the response object in the correct way."
571571msgstr ""
572- "假設 ``BackendProvider`` 已經經過充分測試,那麼我們該如何測試 ``method()``? "
572+ "假設 ``BackendProvider`` 已經經過充分測試,那麼我們該如何測試 ``method()``?"
573573"具體來說,我們要測試程式碼部分 ``# more code`` 是否以正確的方式使用 "
574574"``response`` 物件。"
575575
@@ -603,16 +603,16 @@ msgid ""
603603"We can do that in a slightly nicer way using the :meth:`~Mock."
604604"configure_mock` method to directly set the return value for us::"
605605msgstr ""
606- "我們可以使用 :meth:`~Mock.configure_mock`方法來以稍為友善一點的方式為我們直 "
607- "接設定回傳值 : ::"
606+ "我們可以使用 :meth:`~Mock.configure_mock`方法來以稍為好一點的方式為我們直接 "
607+ "設定回傳值 : ::"
608608
609609#: ../../library/unittest.mock-examples.rst:584
610610msgid ""
611611"With these we monkey patch the\" mock backend\" in place and can make the "
612612"real call::"
613613msgstr ""
614- "有了這些,我們就可以將 \" mock backend\" monkey patch 到位,並且可以進行真正的 "
615- "呼叫 : ::"
614+ "有了這些,我們就可以原地 (in place) monkey patch \" mock backend\" ,並且可以進 "
615+ "行真正的呼叫 : ::"
616616
617617#: ../../library/unittest.mock-examples.rst:590
618618msgid ""
@@ -621,9 +621,9 @@ msgid ""
621621"be several entries in ``mock_calls``. We can use :meth:`call.call_list` to "
622622"create this list of calls for us::"
623623msgstr ""
624- "藉由使用 :attr:`~Mock.mock_calls`,我們可以使用一個斷言來檢查鍊接呼叫。一個鍊 "
625- "接呼叫是一行程式碼中的多個呼叫 ,因此 ``mock_calls``中會有多個條目。我們可以 "
626- "使用 :meth:`call.call_list` 來為我們建立這個呼叫串列: ::"
624+ "藉由使用 :attr:`~Mock.mock_calls`,我們可以使用單一一個斷言來檢查鍊接呼叫。一 "
625+ "個鍊接呼叫是一行程式碼中的多個呼叫 ,因此 ``mock_calls``中會有多個項目。我們 "
626+ "可以使用 :meth:`call.call_list` 來為我們建立這個呼叫串列: ::"
627627
628628#: ../../library/unittest.mock-examples.rst:601
629629msgid "Partial mocking"