@@ -7,7 +7,7 @@ msgstr ""
7
7
"Project-Id-Version : Python 3.12\n "
8
8
"Report-Msgid-Bugs-To : \n "
9
9
"POT-Creation-Date : 2023-12-16 00:03+0000\n "
10
- "PO-Revision-Date : 2024-03-19 00:53 +0800\n "
10
+ "PO-Revision-Date : 2024-03-27 08:49 +0800\n "
11
11
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
12
12
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
13
13
"tw)\n "
@@ -16,7 +16,7 @@ msgstr ""
16
16
"Content-Type : text/plain; charset=UTF-8\n "
17
17
"Content-Transfer-Encoding : 8bit\n "
18
18
"Plural-Forms : nplurals=1; plural=0;\n "
19
- "X-Generator : Poedit 3.4.1 \n "
19
+ "X-Generator : Poedit 3.4.2 \n "
20
20
21
21
#: ../../library/unittest.mock.rst:3
22
22
msgid ":mod:`unittest.mock` --- mock object library"
@@ -798,7 +798,7 @@ msgid ""
798
798
msgstr ""
799
799
"在匹配對 mock 的呼叫時,使用 *spec*\\ (或 *spec_set*\\ )建立的可呼叫 mock "
800
800
"將會內省 (introspect) 規格物件的簽名 (signature)。因此,它可以匹配實際呼叫的"
801
- "引數,無論它們是按位置傳遞還是按名稱傳遞: ::
801
+ "引數,無論它們是按位置傳遞還是按名稱傳遞: ::"
802
802
803
803
#: ../../library/unittest.mock.rst:812
804
804
msgid ""
@@ -2459,7 +2459,7 @@ msgid ""
2459
2459
"args)."
2460
2460
msgstr ""
2461
2461
":attr:`Mock.call_args` 和 :attr:`Mock.call_args_list` 中的 ``call`` 物件是"
2462
- "(位置引數, 關鍵字引數)的二元組,而 :attr:`Mock.mock_calls`中的 ``call`` 物"
2462
+ "(位置引數, 關鍵字引數)的二元組,而 :attr:`Mock.mock_calls` 中的 ``call`` 物"
2463
2463
"件以及你自己建立的 ``call`` 物件是(名稱, 位置引數, 關鍵字引數)的三元組。"
2464
2464
2465
2465
#: ../../library/unittest.mock.rst:2286
@@ -2568,7 +2568,7 @@ msgstr ""
2568
2568
msgid ""
2569
2569
":data:`ANY` is not limited to comparisons with call objects and so can also "
2570
2570
"be used in test assertions::"
2571
- msgstr ""
2571
+ msgstr ":data:`ANY` 不只能與呼叫物件比較,其也可以在測試斷言中使用: :: "
2572
2572
2573
2573
#: ../../library/unittest.mock.rst:2391
2574
2574
msgid "FILTER_DIR"
@@ -2582,10 +2582,10 @@ msgid ""
2582
2582
"filtering, or need to switch it off for diagnostic purposes, then set ``mock."
2583
2583
"FILTER_DIR = False``."
2584
2584
msgstr ""
2585
- ":data:`FILTER_DIR` 是一個模組級別的變數,用於控制 mock 物件回應 :func:`dir`的 "
2586
- "方式 。其預設值為 ``True``,它使用以下描述的過濾方式來只顯示有用的成員。如果你 "
2587
- "不喜歡這個過濾方式 ,或由於診斷意圖而需要將其關閉,請設定 ``mock.FILTER_DIR = "
2588
- "False``。"
2585
+ ":data:`FILTER_DIR` 是一個模組級別的變數,用於控制 mock 物件回應 :func:`dir` "
2586
+ "的方式 。其預設值為 ``True``,它使用以下描述的過濾方式來只顯示有用的成員。如果 "
2587
+ "你不喜歡這個過濾方式 ,或由於診斷意圖而需要將其關閉,請設定 ``mock.FILTER_DIR "
2588
+ "= False``。"
2589
2589
2590
2590
#: ../../library/unittest.mock.rst:2401
2591
2591
msgid ""
@@ -2657,10 +2657,10 @@ msgstr ""
2657
2657
"*read_data* 是檔案處理方法 :meth:`~io.IOBase.read`、:meth:`~io.IOBase."
2658
2658
"readline` 和 :meth:`~io.IOBase.readlines` 的回傳字串。對這些方法的呼叫將從 "
2659
2659
"*read_data* 取得資料,直到資料耗盡。對這些方法的 mock 非常單純:每次呼叫 "
2660
- "*mock* 時,*read_data* 都會倒回到起點。如果你需要對提供給測試程式碼的資料進 "
2661
- "行更多控制 ,你會需要自行客製化這個 mock。如果這樣還不夠,`PyPI <https://pypi."
2662
- "org>`_ 上的其中一個記憶體內檔案系統 (in-memory filesystem) 套件 可以提供用於 "
2663
- "測試的真實檔案系統 。"
2660
+ "*mock* 時,*read_data* 都會倒回到起點。如果你需要對提供給測試程式碼的資料進行 "
2661
+ "更多控制 ,你會需要自行客製化這個 mock。如果這樣還不夠,`PyPI <https://pypi."
2662
+ "org>`_ 上的其中一個記憶體內檔案系統 (in-memory filesystem) 套件可以提供用於測 "
2663
+ "試的真實檔案系統 。"
2664
2664
2665
2665
#: ../../library/unittest.mock.rst:2476
2666
2666
msgid ""
@@ -2669,8 +2669,8 @@ msgid ""
2669
2669
"than returning it on each call."
2670
2670
msgstr ""
2671
2671
"新增對 :meth:`~io.IOBase.readline` 和 :meth:`~io.IOBase.readlines` 的支援。:"
2672
- "meth:`~io.IOBase.read` 的 mock 更改為消耗 *read_data* 而不是在每次呼叫時 "
2673
- "回傳它 。"
2672
+ "meth:`~io.IOBase.read` 的 mock 更改為消耗 *read_data* 而不是在每次呼叫時回傳 "
2673
+ "它 。"
2674
2674
2675
2675
#: ../../library/unittest.mock.rst:2481
2676
2676
msgid "*read_data* is now reset on each call to the *mock*."
@@ -2945,11 +2945,11 @@ msgid ""
2945
2945
"type, autospec doesn't use a spec for members that are set to ``None``. "
2946
2946
"These will just be ordinary mocks (well - MagicMocks):"
2947
2947
msgstr ""
2948
- "這就帶來了另一個問題。為稍後將成為不同型別的物件的成員提供預設值 ``None`` 是相 "
2949
- "對常見的 。``None`` 作為規格是無用的,因為它不允許你存取其上的\\ *任何*\\ 屬性 "
2950
- "或方法 。由於 ``None`` 作為規格\\ *永遠不會*\\ 有用,並且可能表示通常屬於其他 "
2951
- "型別的成員 ,因此自動規格不會對設定為 ``None`` 的成員使用規格。這些會只是普通 "
2952
- "的 mock(通常是 MagicMocks):"
2948
+ "這就帶來了另一個問題。為稍後將成為不同型別的物件的成員提供預設值 ``None`` 是 "
2949
+ "相對常見的 。``None`` 作為規格是無用的,因為它不允許你存取其上的\\ *任何*\\ 屬 "
2950
+ "性或方法 。由於 ``None`` 作為規格\\ *永遠不會*\\ 有用,並且可能表示通常屬於其 "
2951
+ "他型別的成員 ,因此自動規格不會對設定為 ``None`` 的成員使用規格。這些會只是普 "
2952
+ "通的 mock(通常是 MagicMocks):"
2953
2953
2954
2954
#: ../../library/unittest.mock.rst:2734
2955
2955
msgid ""
0 commit comments