@@ -1053,7 +1053,7 @@ msgid ""
1053
1053
msgstr ""
1054
1054
"如果 :attr:`side_effect` 是一個函式,則該函式回傳的東西就是對 mock 的呼叫所回"
1055
1055
"傳的值。:attr:`side_effect` 函式會使用與 mock 相同的引數被呼叫。這讓你可以根"
1056
- "據輸入動態地變化呼叫的回傳值 :"
1056
+ "據輸入動態地變更呼叫的回傳值 :"
1057
1057
1058
1058
#: ../../library/unittest.mock.rst:1153
1059
1059
msgid ""
@@ -1129,15 +1129,15 @@ msgid ""
1129
1129
"creation time. There are two alternatives. One option is to use :meth:`~Mock."
1130
1130
"configure_mock`::"
1131
1131
msgstr ""
1132
- "由於「 name」 是傳遞給 :class:`Mock` 建構函式的引數,如果你想讓你的 mock 物件擁"
1133
- "有「 name」 屬性,你不能在建立時直接傳遞它。有兩種替代方法。其中一個選擇是使"
1132
+ "由於 \" name\" 是傳遞給 :class:`Mock` 建構函式的引數,如果你想讓你的 mock 物件擁"
1133
+ "有 \" name\" 屬性,你不能在建立時直接傳遞它。有兩種替代方法。其中一個選擇是使"
1134
1134
"用 :meth:`~Mock.configure_mock`: ::"
1135
1135
1136
1136
#: ../../library/unittest.mock.rst:1258
1137
1137
msgid ""
1138
1138
"A simpler option is to simply set the \" name\" attribute after mock "
1139
1139
"creation::"
1140
- msgstr "更簡單的方法是在 mock 建立後直接設定「 name」 屬性: ::"
1140
+ msgstr "更簡單的方法是在 mock 建立後直接設定 \" name\" 屬性: ::"
1141
1141
1142
1142
#: ../../library/unittest.mock.rst:1265
1143
1143
msgid "Attaching Mocks as Attributes"
@@ -1154,17 +1154,17 @@ msgid ""
1154
1154
"calls between mocks:"
1155
1155
msgstr ""
1156
1156
"當你將一個 mock 附加為另一個 mock 的屬性(或作為回傳值),它將成為該 mock 的"
1157
- "「下代 (child)」。對下代的呼叫將被記錄在上代的 :attr:`~Mock.method_calls` "
1158
- "和 :attr:`~Mock.mock_calls` 屬性中。這對於配置下代並將它們附加到上代 ,或將 "
1159
- "mock 附加到記錄所有對下代的呼叫的上代並允許你對 mock 間的呼叫順序進行斷言非常"
1157
+ "「子代 (child)」。對子代的呼叫將被記錄在上代的 :attr:`~Mock.method_calls` "
1158
+ "和 :attr:`~Mock.mock_calls` 屬性中。這對於配置子代並將它們附加到上代 ,或將 "
1159
+ "mock 附加到記錄所有對子代的呼叫的上代並允許你對 mock 間的呼叫順序進行斷言非常"
1160
1160
"有用:"
1161
1161
1162
1162
#: ../../library/unittest.mock.rst:1285
1163
1163
msgid ""
1164
1164
"The exception to this is if the mock has a name. This allows you to prevent "
1165
1165
"the \" parenting\" if for some reason you don't want it to happen."
1166
1166
msgstr ""
1167
- "如果 mock 有 name 引數,則上述規則會有例外。這使你可以防止「上下代關係 "
1167
+ "如果 mock 有 name 引數,則上述規則會有例外。這使你可以防止「親屬關係 "
1168
1168
"(parenting)」的建立,假設因為某些原因你不希望這種狀況發生。"
1169
1169
1170
1170
#: ../../library/unittest.mock.rst:1296
@@ -1192,7 +1192,7 @@ msgstr ""
1192
1192
1193
1193
#: ../../library/unittest.mock.rst:1323
1194
1194
msgid "The patchers"
1195
- msgstr "The patchers "
1195
+ msgstr "Patchers "
1196
1196
1197
1197
#: ../../library/unittest.mock.rst:1325
1198
1198
msgid ""
@@ -1405,7 +1405,7 @@ msgid ""
1405
1405
"To configure return values on methods of *instances* on the patched class "
1406
1406
"you must do this on the :attr:`return_value`. For example::"
1407
1407
msgstr ""
1408
- "若要配置被 patch 的類別的*實例*方法的回傳值,你必須在 :attr:`return_value` 上"
1408
+ "若要配置被 patch 的類別的\\ *實例*\\ 方法的回傳值,你必須在 :attr:`return_value` 上"
1409
1409
"進行配置。 例如: ::"
1410
1410
1411
1411
#: ../../library/unittest.mock.rst:1447
0 commit comments