@@ -433,27 +433,33 @@ msgid ""
433433":attr:`side_effect`, then pass the corresponding parameter as ``True``. "
434434"Child mocks and the return value mock (if any) are reset as well."
435435msgstr ""
436+ "这在你想要创建一系列重用相同对象的断言时会很有用处。 请注意 :meth:`reset_mock` *不会* "
437+ "清除返回值、:attr:`side_effect` 或任何你使用普通赋值所默认设置的子属性。 如果你想要重置 *return_value* 或 "
438+ ":attr:`side_effect`,则要为相应的形参传入 ``True``。 子 mock 和返回值 mock (如果有的话) 也会被重置。"
436439
437440#: ../../library/unittest.mock.rst:418
438441msgid "*return_value*, and :attr:`side_effect` are keyword only argument."
439- msgstr ""
442+ msgstr "*return_value* 和 :attr:`side_effect` 均为仅限关键字参数。 "
440443
441444#: ../../library/unittest.mock.rst:424
442445msgid ""
443446"Add a spec to a mock. *spec* can either be an object or a list of strings. "
444447"Only attributes on the *spec* can be fetched as attributes from the mock."
445448msgstr ""
449+ "为 mock 添加规格说明。 *spec* 可以是一个对象或字符串列表。 只有 *spec* 上的属性可以作为来自 mock 的属性被获取。"
446450
447451#: ../../library/unittest.mock.rst:428
448452msgid "If *spec_set* is true then only attributes on the spec can be set."
449- msgstr ""
453+ msgstr "如果 *spec_set* 为真值则只有 spec 上的属性可以被设置。 "
450454
451455#: ../../library/unittest.mock.rst:433
452456msgid ""
453457"Attach a mock as an attribute of this one, replacing its name and parent. "
454458"Calls to the attached mock will be recorded in the :attr:`method_calls` and "
455459":attr:`mock_calls` attributes of this one."
456460msgstr ""
461+ "附加一个 mock 作为这一个的属性,替换它的名称和上级。 对附加 mock 的调用将记录在这一个的 :attr:`method_calls` 和 "
462+ ":attr:`mock_calls` 属性中。"
457463
458464#: ../../library/unittest.mock.rst:440
459465msgid "Set attributes on the mock through keyword arguments."
0 commit comments