@@ -230,8 +230,8 @@ msgid ""
230
230
"allowing you to make assertions about what your code has done to them."
231
231
msgstr ""
232
232
":class:`Mock` 是一個彈性的的 mock 物件,旨在代替程式碼中 stubs 和 test "
233
- "doubles (測試替身)的使用。Mock 是可呼叫的,並在你存取它們時將屬性創建為新 "
234
- "的 mock [#]_。存取相同的屬性將永遠返回相同的 mock。Mock 記錄了你如何使用它"
233
+ "doubles (測試替身)的使用。Mock 是可呼叫的,並在你存取它們時將屬性建立為新 "
234
+ "的 mock [#]_。存取相同的屬性將永遠回傳相同的 mock。Mock 記錄了你如何使用它"
235
235
"們,允許你判定你的程式碼對 mock 的行為。"
236
236
237
237
#: ../../library/unittest.mock.rst:218
@@ -242,7 +242,7 @@ msgid ""
242
242
"`NonCallableMock` and :class:`NonCallableMagicMock`"
243
243
msgstr ""
244
244
":class:`MagicMock` 是 :class:`Mock` 的子類別,其中所有魔術方法均已預先建立並"
245
- "可供使用。也有不可呼叫的變體,在你 mock 無法呼叫的物件時很有用:\\ :class:"
245
+ "可供使用。也有不可呼叫的變體,在你 mock 無法呼叫的物件時很有用::class:"
246
246
"`NonCallableMock` 和 :class:`NonCallableMagicMock`"
247
247
248
248
#: ../../library/unittest.mock.rst:223
@@ -253,15 +253,15 @@ msgid ""
253
253
"class of :class:`Mock` using the *new_callable* argument to :func:`patch`."
254
254
msgstr ""
255
255
":func:`patch` 裝飾器可以輕鬆地用 :class:`Mock` 物件臨時替換特定模組中的類別。"
256
- "默認情況下, \\ :func:`patch` 會為你建立一個 :class:`MagicMock`\\ 。你可以使"
256
+ "預設情況下, :func:`patch` 會為你建立一個 :class:`MagicMock`。你可以使"
257
257
"用 :func:`patch` 的 *new_callable* 引數指定 :class:`Mock` 的替代類別。"
258
258
259
259
#: ../../library/unittest.mock.rst:231
260
260
msgid ""
261
261
"Create a new :class:`Mock` object. :class:`Mock` takes several optional "
262
262
"arguments that specify the behaviour of the Mock object:"
263
263
msgstr ""
264
- "建立一個新的 :class:`Mock` 對象。 \\ :class:`Mock` 接受數個可選的引數來指定 "
264
+ "建立一個新的 :class:`Mock` 物件。 :class:`Mock` 接受數個可選的引數來指定 "
265
265
"Mock 物件的行為:"
266
266
267
267
#: ../../library/unittest.mock.rst:234
@@ -335,7 +335,7 @@ msgid ""
335
335
"is a new Mock (created on first access). See the :attr:`return_value` "
336
336
"attribute."
337
337
msgstr ""
338
- "*return_value*:當呼叫 mock 時回傳的值。默認情況下 ,這是一個新的 Mock(在首次"
338
+ "*return_value*:當呼叫 mock 時回傳的值。預設情況下 ,這是一個新的 Mock(在首次"
339
339
"存取時建立)。參見 :attr:`return_value` 屬性。"
340
340
341
341
#: ../../library/unittest.mock.rst:266
@@ -345,7 +345,7 @@ msgid ""
345
345
"`AttributeError`. Passing ``unsafe=True`` will allow access to these "
346
346
"attributes."
347
347
msgstr ""
348
- "*unsafe*:默認情況下 ,存取任何以 *assert*、*assret*、*asert*、*aseert* 或 "
348
+ "*unsafe*:預設情況下 ,存取任何以 *assert*、*assret*、*asert*、*aseert* 或 "
349
349
"*assrt* 開頭的屬性將引發 :exc:`AttributeError`。如果傳遞 ``unsafe=True``\\ ,"
350
350
"將會允許存取這些屬性。"
351
351
@@ -358,17 +358,17 @@ msgid ""
358
358
"to access an attribute that doesn't exist will raise an :exc:"
359
359
"`AttributeError`)."
360
360
msgstr ""
361
- "*wraps*:被 mock 物件包裹的項目 。如果 *wraps* 不是 ``None``,那麼呼叫 Mock 將"
362
- "通過被包裹的物件(返回真實結果 )。存取 mock 的屬性將會返回一個 Mock 物件,該"
363
- "物件包裹了被包裹物件的對應屬性 (因此嘗試存取不存在的屬性將引發 :exc:"
361
+ "*wraps*:被 mock 物件包裝的項目 。如果 *wraps* 不是 ``None``,那麼呼叫 Mock 將"
362
+ "通過被包裝的物件(回傳真實結果 )。存取 mock 的屬性將會回傳一個 Mock 物件,該"
363
+ "物件包裝了被包裝物件的對應屬性 (因此嘗試存取不存在的屬性將引發 :exc:"
364
364
"`AttributeError`\\ )。"
365
365
366
366
#: ../../library/unittest.mock.rst:280
367
367
msgid ""
368
368
"If the mock has an explicit *return_value* set then calls are not passed to "
369
369
"the wrapped object and the *return_value* is returned instead."
370
370
msgstr ""
371
- "如果 mock 已經明確設定了 *return_value*,那麼呼叫並不會被傳遞到被包裹的物件 ,"
371
+ "如果 mock 已經明確設定了 *return_value*,那麼呼叫並不會被傳遞到被包裝的物件 ,"
372
372
"而是回傳已設定好的 *return_value*。"
373
373
374
374
#: ../../library/unittest.mock.rst:283
@@ -385,7 +385,7 @@ msgid ""
385
385
"used to set attributes on the mock after it is created. See the :meth:"
386
386
"`configure_mock` method for details."
387
387
msgstr ""
388
- "Mocks 還可以使用任意的關鍵字引數進行呼叫。這些關鍵字引數將在創建 mock 之後用"
388
+ "Mocks 還可以使用任意的關鍵字引數進行呼叫。這些關鍵字引數將在建立 mock 之後用"
389
389
"於設定 mock 的屬性。欲知更多,請參見 :meth:`configure_mock` 方法。"
390
390
391
391
#: ../../library/unittest.mock.rst:293
@@ -428,7 +428,7 @@ msgid ""
428
428
"assert the mock has been called with the specified calls. The :attr:"
429
429
"`mock_calls` list is checked for the calls."
430
430
msgstr ""
431
- "斷言 mock 已經使用指定的呼叫所呼叫 。此斷言會檢查 :attr:`mock_calls` 串列中的"
431
+ "斷言 mock 已經使用指定的呼叫方式來呼叫 。此斷言會檢查 :attr:`mock_calls` 串列中的"
432
432
"呼叫。"
433
433
434
434
#: ../../library/unittest.mock.rst:365
@@ -444,7 +444,7 @@ msgid ""
444
444
"If *any_order* is true then the calls can be in any order, but they must all "
445
445
"appear in :attr:`mock_calls`."
446
446
msgstr ""
447
- "如果 *any_order* 為 true,那麼這些乎醬可以以任何順序出現 ,但它們必須全部出現"
447
+ "如果 *any_order* 為 true,那麼這些呼叫可以以任何順序出現 ,但它們必須全部出現"
448
448
"在 :attr:`mock_calls` 中。"
449
449
450
450
#: ../../library/unittest.mock.rst:384
0 commit comments